Greetings,
Ophthalmology is a post graduation field under MS. During MBBS almost everything is touched upon in general but only during your PG studies would you choose a branch like ophthalmology (eye specialist) to study in depth and become a full fledged doctor in. To go that way you you will need to clear the NEET- PG exam and get good enough rank as these branches of MS are pretty sough after and hard to get (less seats, more competition, etc.)
best of luck if you plan on going that way, here is a link for more info on NEET PG:
https://medicine.careers360.com/exams/neet-pg
hope it helps.
Regular exam updates, QnA, Predictors, College Applications & E-books now on your Mobile