Peel the potatoes and onions and chop roughly.
Gently heat the olive oil in a frying pan (skillet) over medium heat. Take care not to let the oil get too hot.
Add the potatoes and onions to the pan, and gently fry for 20 minutes.
Meanwhile, whisk the eggs and season with salt and pepper.
When the potatoes and onions have softened, drain half the oil from the pan and add the whisked eggs.
Once the surface of the tortilla has set (at least 10 minutes), carefully turn it out onto a flat plate. Slide it back into the pan to finish cooking the other side for at least 10 minutes.