Masjid is a Punjabi, Urdu, Hindi word meaning "mosque" or referring to the Muslim place of worship. A mosque is the place where people of the Islamic faith say their prayers called Nimaz. The devout muslim is supposed to say his or her prayers 5 times at day at proscribed times.
Masjids are oriented so that the congregation faces in the direction of Mecca while doing Namaz. As in Gurdwaras shoes must be removed, but women are not permitted in the same room with the men as in Gurdwaras which says something about the equality, rather the lack of equality, of women in Islam.
As the Chinese would kowtow to their emperors making an audable thud as their forehead hit the floor, some Muslims, making a show of their dedication, will slam their heads to their prayer matt with an audable thump. This often renders a mark or bump on one's forehead popularly called a prayer bump as seen in photographs of Ayman Zawahiri.
Muslims consider the soul of anyone's foot being pointed in their direction to be an insult. Therefore they face their beds away from the direction of Mecca.
A related tale is told of Guru Nanak's visit to Mecca. He had slept outdoors with his feet turned inadvertently towards the Ka'aba, which they consider to be the one Earthly House of God. The chief priest of the place came and said,
- “O forgetful stranger! Awake and see your feet are turned toward the House of God!”
The Guru replied:
- “Is it so? Pray, turn my feet yourself in the direction where the House of God is not.”