The heat in the pasta, which has just come out of the cooking water, continues to cook it further. If the pasta has to be eaten a long time after cooking (e.g. as in salads), it should not be covered when in a very hot state. Instead of that, stir in some oil or butter and leave it open to cool off. Include the subsequent cooking when you calculate the cooking time, by reducing the cooking time in water by a minute.