Boil the potatoes until they become really soft (about 20-40 minutes, depending on their size).
Drain, peel and mash the potatoes evenly, then add the flour while they are still warm (otherwise they'll become sticky).
When you have an even soft non-sticky dough, cut it in smaller parts and roll them with your palms to get a long rope about ⅔ inch thick (2 cm). Keep the surface and the dough smooth with flour to prevent stickiness.
Now with a dough scraper or knife, cut the gnocchi about 1 inch long (2-3 cm).
With a fork or gnocchi board, roll the iconic stripes on the gnocchi. These will help the sauce adhere more. Let them rest on a clean towel until ready to cook.
In a large pot bring to boil salted water and toss the gnocchi one by one so they won't stick. It will take 1-2 minutes to cook.
As soon as the gnocchi float to the surface, it means they are ready. Take them out with a skimmer and toss them in the pan with the chosen sauce.
Video
Notes
The main trick in making perfect pillows is getting the potato and flour ratio right. If you add too much flour, they're going to be tough and chewy. If you add too little flour, they're going to melt in the boiling water. Follow the recipe exactly, for the perfect fail-proof gnocchi.
Knead the dough while the potatoes are still warm. This will ensure the perfect consistency and firmness.