How would the Internet work between planets? Say that in the future there are people on other planets, e.g., Mars.  The one-way communication delay to Mars is between 3 and 21 minutes.

Say we want to connect the people on Mars to the Internet.  How would we deal with the communication delay? For example, we don't want to get request timeouts as fast as we have them normally (on Earth).  Would network protocols need to be adjusted or modified to deal with the increased latency?
There would be special protocols for interplanet communication. Right now there are already different routing protocols for connecting different cities, different countries and different continents.

BGP (Border Gateway protocol) is a routing protocol used between continents mainly. It has different parameters and behavior than OSPF or RIP or other protocols used between different LAN's or WAN's.

Read about BGP. Some other protocols would probably be developed for even larger distances and for connecting different planets.