There are three categories of people who are obligated to pray. 1. Muslim. 2. Sane. 3. Mature.
What is the sign of maturity in Islam? If you are a male then the age of 15 or if hair has grown around the private parts or if you have had a wet dream. This is a sign of maturity for males. For females it is centered around the period. If she has started her period then she should start praying unless she has her period, then she doesn’t pray at this time.
Sane means you are characterized as being sane. This means you are not someone who is legally insane, If you speak to them then they may not be able to understand what you are saying or give an answer that is not normal. Ideally this should be confirmed by a psychologist.
A person has to be Muslim for them to be obliged to pray five times a day. The prayer upon the believers has been ordained at 5 specific times throughout the day. The prayer is upon the person who wants structure in their life. The prayer gives us discipline that we must pray at certain times of day.