Put water on to boil in a large pot. When it comes to a boil, salt generously and throw in the spaghetti.
Shortly before the spaghetti is done cooking, melt a good dollop of lard in a skillet. When it's good and hot, break open the egg and add it to the skillet. Fry the egg "sunny side up", but not too much, taking care that the yolk remains runny and the whites are cooked but still soft. (If the pasta isn't done yet, you can remove the egg to prevent it from overcooking and return it to the skillet along with the pasta.)
If using an extra egg for garnish, fry it in the lard also and remove as soon as it's done.
When the pasta is al dente, transfer it to the skillet, along with the grated cheese, a good grinding of black pepper and a ladleful of the pasta cooking water. Mix vigorously over a gentle flame, breaking up the egg, until the pasta is well coated with its condimento.
Transfer the spaghetti immediately to a plate or serving dish, topped with another grinding of pepper and the extra egg for garnish if you like.