The Prophet Muhammad taught Muslims how to observe Ramadan through fasting during the day and praying at night. He showed great compassion for others and allowed flexibility in fasting for those who were traveling or experiencing hardship. The Prophet also emphasized spiritual acts like seclusion in the mosque to worship God during Ramadan and stressed treating all people, including the less fortunate, with kindness, gentleness and mercy.