In Hinduism, Yogi is defined as a person who follow these 4 rules.
- Brahmcharya(Pure Body)
- Shudhdhta(Pure mind)
- Pavitrata(Pure soul)
- Satsang(Sat means GOD and sang means communion)
To keep your soul in communion with GOD, Pure Body is the first need. People always bow to Rishies, sages, they actually bow to their pure life. In geeta lord mentioned many times that Kaam is the great enemy of Yogi.
Kaam does not mean that you can not have children, but Kaam means Vasana means desire of sex or just having sex to fullify bodily desires like animals or just bodily attractions.
Lord has mentioned that
People whose hearts are filled by Dharma, Kaam in their body is also my will to rule the (birth)cycle.
Hinduism is not opposing sex for children wishes instead it supports it. Many rishes have children, even hindu deities also have. You need to understand the Brahmcharya's meaning.
In hinduism there is a great importance of "Maun", most people understand it as not speaking or keeping mum means maun, actually maun means stopping your bad ideas and desires is maun.
Lord has mentioned in Gita that "Win your Indriyas", Hanumanji is called
Jeetendriyam means person who won indriyas in shloka,
Jeetendriyam budhdhivatam varishtham,.....
Means hanumanji a true Brahmachari who won indriyas, means all his indriyas are in his control.
Brahmachari does not mean who just be virgin , or do not masturbate, but is a person who never "see"/"think about" any woman without purity.
Pure body always have better strength over diseases, and also required for true Yogi.
Just for your information, in Islam masturbating is considered as a sin also.
Steps in Detail
Step 1 Brahmcharya
Brahmcharya is the first step to Yoga. The person is asked to be free from physical impurities and asked to keep his body clean by taking bath 3 times a day, having Satvik Bhojana, and avoiding Sex and perform yoga exercises at morning. A person is asked to do meditation as much as possible. Meditation is defined in Hinduism as
"Forgetting that I am body and being in Aatmik stage, means I am soul, not a body." A person is given body to do good deeds only, so using Indriyas as much less as much possible.
Just having saxual pleasure is considered as "Pashuta" means animal feelings. Dharma is to rise above this Pashuta.
Brahmcharya is itself considered as Tapa, for ex, in the case of Bhishma, Hanumana, Parshurama, Swaminarayana etc.
Brahmcharya increases your willingness in Yoga. In Yoga sutra it is one of the Niyamas(rules) in Patanjali.
Step 2 Shudhdhata
First make your body pure, then Second step Shudhdhata means see everybody as pure soul. In Geeta Lord said,
That devotee of mine who has nutral nature and who see dog,elephant,gentleman and demon as same souls, I like him the most.
Means I am also a pure soul and others are also a pure soul, this thought creates purity in your mind. An no hate feelings for others.
Step 3 Paveetrata
Third step, Paveetrata means be pure, do pure and have good ideas, if bad ideas come, just see them with pureness they will go away.
Purity is defined as it has no intuitions, If self does not interfere, nature speaks through us.
Steps to be pure:
a. Perform meditation as much as possible
b. Japa(Chanting name of GOD),Tapa(Penance), Upavaas(fast),prayers, Yajna etc. Follow Hinduism rules in Vedas given for standard life
c. Seek forgiveness for your past sins to the person/GOD
d. Follow righteousness, like speaking truth etc.
e. Nobody(not even creatures) should be harmed by you
f. Increase Positivity and joy in your nature
Purity is maintained only by following righteousness. Pure soul always see world with compassion and performs duties towards society.
Purity gathers your "Yoga Tapa" or "Yoga Bala". GOD always protects the Yoga Bala of his devotees. This is called "Yoga Kshem" also. And GOD is called Yogeshwara.
Step 4 SatSanga
Last step, be in communion with GOD, the person who leave everything in GOD's hand will eventually find GOD's hand in everything. But this is only possible if person follows righteousness , speaking truth etc. Seek GOD to show you a way to meaningful life. GOD is the best Guide, he will give all your answers and only he can, if you communicate with him.
When you understand that only you,yourself never do anything, It is governed by GOD only as per his will, that day some great work will be done by your hands. This is called being "Nimita" only. Then no Karma will bind you as you are doing as it's GOD will only, leaving all fears,wishes,gains etc.
If you follow these rules strictly, you will be able to have psychological powers, you will be able to grasp vibrations, people's intentions, Telepathy,seeing future in dreams etc. You soul's power may increase if it's GOD's will.
Only pure body can feel vibrations from other pure souls.(Telepathy) <- This statement is my personal experience/belief which I wanted to share with this answer, may be for others this statement may not be true, I just shared.
Now, Reference for these 4 steps,
Bhishma Parva + Ramayana + Ayurveda -> Brahmcharya
Sankhya Yoga(Geeta)+Atmasanyam yoga -> Shudhdhata
Gyaana–Karma-Sanyasa yoga+Bhakti Yoga(Geeta) -> Paveetrata
Satsang -> In gita, lord said "Oh Arjuna, follow my orders, come under my protection,surrender unto me and perform duties, help is always ready."