Two choices: 1. You can cook the pasta until it is almost done, remove it from the water and set it aside or refrigerate it (depending on how much time is going to elapse), and toss it in boiling water again for a minute or two just before serving. This method virtually guarantees that your pasta will be well done and past the desirable point called al dente, because it will continue to absorb moisture while it is resting.
2. You can cook fresh pasta at the last minute, because it only takes a minute or two to reach the lovely al dente point. We vote for Option 2.
Related Article: Keeping Pasta Hot for a Buffet