There are matters that invalidate the prayer. These matters should be known in order to avoid them. Some of the invalidators are:
Speaking on purpose
This means the person who is praying says other than the prayers statements. Even two letters or one meaningful letter, unless one forgets and speaks a little. However, mentioning Allah does not invalidate the prayer
Eating or drinking
If a person while remembering that he is praying eats or drinks on purpose, the prayer becomes invalid even if he eats something as little as a sesame seed
Moving a lot
If a person who is praying moves a lot in his prayer such as if he makes three consecutive moves the prayer becomes invalid. Making an excessive move invalidates the prayer, this means if a person praying makes a big jump and the like, the prayer becomes invalid.
Moving to play
Even one small move such as moving the tongue or moving the eyebrow for the purpose of playing
Doing an extra integral
If a person prostrates three times in one rak'ah intentionally, then his prayer becomes invalid
Changing the intention
If a person while praying intends to interrupt the prayer before finishing it, or he debates whether or not to interrupt it, or makes interruptuing it contingent on the occurence of something, this makes his prayer invalid. If one intends in his heart "I will stop my prayer if someone knocks the door, then the prayer is invalid immediately.
Exiting the state of purification
If a person's Wudu becomes invalid when praying, by passing gas for example, or the like, his prayer becomes invalid