The presence of a boil means the infection’s already there. The trick now is to let it heal and not make it worse.
The boil will develop more pressure until it bursts and drains the pus. It should heal after that (sometimes it heals without developing a white head, but that’s rare).
There are things you can do to encourage boils to heal and things you don’t want to do, which will make them worse.