First, have plenty of money. Then you can learn and practice karting (where all recent F1 drivers (and most other racing drivers) learned their trade). Then, after success, talk to one of the teams that covers most formulae (like Redbull and McLaren) and ask to join their trainee programme.
If you start now you might get there in around 7 years. There may be other routes into (say) US or non open-wheel racing. Someone else may be able to advise.