I want to do phd in mathematics
You need to pass MSc with a first class (some universities want first class, some may allow 55% marks).
Then you need to qualify atleast in one of CSIR-UGC (JRF), GATE (gate score is valid only for a few years, you have to apply within this period), NBHM, INSPIRE. Then you apply to individual universities/institutes. If the applications are too many for them to handle, they would conduct an entrance exam/screening exam. After that there will be interview for a few selected candidates. If you qualify in any of the above mentioned (except GATE), you will get a fellowship. In some of the institutes you may get fellowship with GATE also.
In some universities it may be possible to join for a PhD with just an MSc and they may not require you to qualify in CSIR etc.