Network Address Translation (NAT) is a process that modifies packets sent from/to the local area network to/from the Internet or other IP based networks.
On the way out
Packets passing through the address translator engine on the way from the LAN are changed or translated to look as if they came from the computer running NAT (this computer is directly connected to the Internet). What actually happens is the "source" IP address is changed in the header and replaced by the (public) IP address of the "NAT'd" interface.
The NAT engine also creates a record table of information for each packet that passed through to the Internet or other public network.
On the way back
Packets passing through the NAT on the way TO the LAN are checked against the records kept by the NAT engine. There, the "destination" IP address is changed (based on the records in the table) back to the specific internal private class IP address in order to reach the computer on the LAN .
Remember that the packet originally returns with the public IP address of the NAT'd computer as its "destination". The NAT engine had to change this information in order to deliver the packet to the correct recipient within the local network.