I'm sorry if this is a really stupid question; my networking knowledge is pretty sparse.
So, a user makes a HTTP request to some address. That request comes from an address on a local subnet, but the router knows to send the request to its default gateway because the destination IP doesn't match anything else in its routing table. The request hops through the internet and is eventually received by the destination machine (a web server). That all makes sense.
But now, how does the web server manage to send the request back to the local machine? Didn't the request come from an IP address on a local subnet? Where did it pick up the IP address of the local machine's router? And even if it has that router's IP, how does the packet get routed to the local machine once it gets to the router?