>>11408218You do research as an undergraduate, ideally get a job in a professors lab or intern over the summers at a research institute. Get a feel for the work you may be interested in doing. Do well in undergrad and apply for PhD programs. If you get accepted somewhere with funding that signifies the school thinks your smart enough to get a PhD. Worse case you go to one of these schools and wash out after the coursework and leave with a free (ignoring opportunity costs) a free masters degree.