Stir the pasta occasionally while it cooks, and make sure you're using plenty of water. Adding a splash of olive oil to the cooked pasta can also help.