Heat the olive oil in a large skillet over medium heat. Add the potatoes and onions and cook, stirring occasionally, until the potatoes are tender and the onions are translucent, about 15 minutes.
Beat the eggs in a large bowl and season with salt and pepper.
Add the potato and onion mixture to the eggs and stir to combine.
Pour the mixture back into the skillet and cook over medium-low heat for about 10 minutes, until the bottom is golden brown.
Use a plate to cover the skillet, then carefully invert the skillet so the tortilla falls onto the plate.
Slide the tortilla back into the skillet and cook for an additional 5-10 minutes, until the other side is golden brown.
Once done, you can cut and serve warm or cold.