One way to do this, is by what is known as the von-Neumann trick.
Imagine you have a biased coin where you get heads($H$) with probability $p$ and tails($T$) with probability $1-p$. Notice that if you throw the coin twice, the outcomes $HT$ and $TH$ are equiprobable with probability $p(1-p)$. You can simulate a fair coin by assigning the outcome $HT$ to $H$ and the outcome $TH$ to $T$. If you get one of the other two cases($HH$ or $TT$) you ignore them and repeat the experiment.
Now that you know how to simulate a fair coin, you can easily extend this to simulate throwing a fair coin multiple times by repeating the above experiment.
Note that this method can be very inefficient, especially when $p$ approaches $1$ e.g $p=0.99$. Since you are waiting for the first event $HT$ or $TH$, you are wasting a lot of throws since those two events only occur with probability $p(1-p)=0.0099$ each.