It is safe to eat cold pasta as long it has been stored properly in a refrigerator, and it's less than five days old.
As soon as you have cooked the pasta, you should rinse any that you wish to store in cold water.
If you have accidentally left a pan of cold pasta at room temperature for more than two hours, it needs to be thrown away.
You can keep cold pasta in the fridge for up to five days for most kinds of pasta. However, it is worth checking whether there are any storage recommendations on the packet...