It was narrated that Rifa'ah bin Rafi'- who had been present at Badr- said:
We were with the Messenger of Allah (ﷺ) when a man entered the Masjid and prayed. The Messenger of Allah (ﷺ) watched him without him realizing, then he finished, came to the Messenger of Allah (ﷺ) and greeted him with salam. He returned the salam and said: Go back and pray, for you have not prayed.' He (the narrator) said: I do not know if it was the second or third time,- (the man) said: 'By the One Who revealed the Book to you, I have tried my best. Teach me and show me.' He said: 'When you want to pray, perform wudu' and do it well, then stand up and face the qiblah. Then say the takbir, then recite, then bow until you are at ease in bowing. Then stand up until you are standing up straight. Then prostrate until you are at ease in prostration, then raise your head until you are at ease in sitting, then prostrate until you are at ease in prostration. If you do that then you will have done your prayer properly, and whatever you failed to do properly is going to detract from your prayer.