What Is the Islamic Way of Mourning the Dead?

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