Put pasta, water and salt in the Instant Pot. If the pasta doesn't fit in a pot (like spaghetti), break it in half so it fits.
Close the Instant Pot lid and set the valve to Sealing position. Press the "Pressure Cook" or "Manual" button and set the time to 1 minute (or 2 minutes if you like softer pasta).
When it finishes cooking, let the Instant Pot naturally release the steam for 5 minutes (set the timer to make sure you don't leave the pasta in there for longer than that, or it will get mushy), then quick release (QR) the remaining steam. When doing QR, I recommend putting a kitchen towel over the vent it case of sputters (as starchy pasta water sometimes spills out of the vent).
Open the lid on the Instant Pot, toss the pasta with sauce if using, then remove the pasta from the Instant Pot and serve.