After the client and server have exchanged information by sending requests and responses, either or both parties may end the transaction by closing the connection.
This is done by terminating the TCP connection (usually to port 80) that was set up in the connection stage. The exact specification of closing the connection is left to the TCP protocol, since HTTP is an application layer protocol.