How to Mourn a Death in Islam: A Complete Guide

What is the Islamic stance on mourning the dead? And how long one is permitted to mourn?