By studying hard,
Have some healthy mutualistic good-discussion-mate friendship that you enjoy in and outside the class,
Having less sleep than usual (no more than 4 hrs a day)
Interpreting subject of discussion from many textbooks, youtube videos, and even medical series
Having good mentors that can always inspire you to ask,
And substantial amount of luck that place you in an environment that does not many have too many nerds and genius nearby
Qorry Amanda, studied at Medical School
Source: Quora Digest
By studying hard.