The act of throwing pasta at the wall is not a traditional or common practice in Italian cooking. It is a cooking myth or misconception that has been popularized in some regions, often for comedic or dramatic effect in movies and TV shows.
The real method of determining pasta doneness in Italian cooking, and in cooking in general, is to taste it. The best way to check if pasta is cooked to your desired level of doneness is to take a piece out of the boiling water and taste it. Pasta should be cooked "al dente," which means it should be tender but still have a slight firmness when bitten.
Throwing pasta at the wall can lead to some pieces sticking, but it is not a reliable or accurate method for determining doneness. Moreover, it can create a mess and waste perfectly good pasta.
So, to ensure your pasta is cooked perfectly, taste it directly from the pot during the last minutes of cooking to get the ideal texture, rather than relying on the wall-throwing myth.