You'll need a deep, nonstick skillet
A hot pan is as good as nonstick. As long as the pan is very hot when the potatoes, onions, and eggs are poured in, the tortilla will release in one piece.
You can make a tortilla with the barest of kitchen equipment, just a bowl and a skillet. The pan must be deep enough to contain all the potatoes and should preferably have gently sloping sides to give the tortilla its shape, which is like a Frisbee. For the recipe that follows, a 10-1/2-inch skillet that's at least 1-1/2 inches deep is ideal. The sliced potatoes will fill the pan, which is fine as long as you turn them carefully as they cook in the oil. Though I'm not usually a fan of nonstick skillets, I do embrace them for tortillas. A tortilla that won't release cleanly from the pan isn't a total disaster, but it is irritating, and messy.
Heat the oil until a potato slice sizzles but doesn't brown. You're not making french fries—you're cooking potatoes until they're tender inside yet soft and pale outside. If a few slices do get golden and crispy, it's no big deal (actually, they're delicious and quite tempting to eat), but remember that this isn't the point. The chopped onions cook the same way. If the pan is deep enough, you can speed things along by cooking the onions and potatoes together, adding the onions to the pan when the potatoes are about halfway done.
This isn't deep-frying. The potatoes will sizzle and the oil will bubble, but the potatoes shouldn't get brown or crisp.
Once the potatoes and onions are cooked and drained, they're added to the beaten eggs. Some Spaniards let the egg and potato mixture sit for a short time, maybe 15 minutes, so the potatoes absorb some of the eggs. I don't find that necessary, but it's okay to do it, if you want. Other cooks crush the potatoes a bit as they sit in the eggs. That is not okay, in my opinion, as it ruins the layered effect that you get in the finished tortilla.
The egg, potato, and onion mixture gets cooked in the same pan that you used to fry the potatoes and onions. Here's where a little knowledge goes a long way.
Wipe out the skillet. If it's not nonstick, use a spatula to scrape out any stuck-on bits, and then wipe out the pan with a wadded paper towel.
To prevent sticking, heat the skillet on high. In a hot pan, the eggs coagulate immediately, before they have time to fill the tiny pores in the pan and stick to it. It doesn't matter how much oil you add to the pan -- if it isn't hot enough when the eggs go in, the tortilla won't come out in one piece.
After the mixture cooks for a minute, reduce the heat. This ensures that the inside sets before the outside burns. A low temperature also seems to make the eggs firmer and denser, which is what you want in a tortilla.
Pick a large, flat plate for flipping
The dramatic climax of tortilla making comes when the eggs have mostly set and the tortilla is ready to be flipped. This is what makes a tortilla different from an Italian frittata (where the pan goes in the oven to finish cooking the eggs).