All TCP/IP connections have 4 numbers. Suppose it is between Alice and Bob.
We have Alice_IP and Alice_Port, and we have Bob_IP and Bob_Port.
When there is a NAT between them (say, translating Alice-side requests), takes the Alice_IP and Alice_Port and replaces them with NAT_IP and NAT_Port.
So to Bob and all networks between the NAT and Bob, the connection is between NAT_IP and NAT_Port and Bob_IP and Bob_Port.
The NAT keeps a table saying "Packets from Bob_IP and Bob_Port targeting NAT_IP and NAT_Port gets translated to Alice_IP and Alice_Port".
While this is typically used so that private IP addresses can be used by Alice and her friends, and the NAT owns a NAT_IP that is a public IP valid on the entire internet.
But you can also have layers of NAT between Alice and Bob, some facing Alice some facing Bob. It could even be used to when the addresses translated-to are real public internet addresses (but I don't see much point).
DHCP solves a different problem. When you connect to a network, you may not have an IP address. DHCP is a way your computer can broadcast "Hello, this is me [ethernet hardware id], I need an IP address, can anyone help me?"
Often a router will be configured to respond with "Sure, here is an IP address", and the router remembers (a) your mac address has that IP address, and (b) the IP address is on that particular sub-network.
Where it gets those IP addresses is not something DHCP concerns itself about. On a typical consumer router, it grabs them from a pool of IP addresses reserved for private use, 10.xx.xx.xx, or 192.168.xx.xx.
The problem is then that the rest of the internet cannot route to those addresses. In fact, many routers on the internet are configured to just drop packets with those addresses.
Your consumer router connects to your ISP's router (or equivalent), which in turn distributes it an IP address. Your router typically does NAT, converting the DHCP-from-private-IP address connections of your household computers to its own DHCP-from-ISP provided IP address. Possibly your ISP then translates your router's IP address into a real internet IP address using yet another layer of NAT; or, maybe your ISP owns enough IP addresses that they can give your router a "real on the internet" IP address.
The downside to this NAT is that your computer doesn't have a unique identity. So when someone wants to connect to your computer, if they send a packet at what appears to be your computer's IP address, they instead send it to the router.
And the router may not have an entry in its NAT table for this new, unsolicited connection, so it drops the connection as nonsense.
There are hacks to get around this of varying effectiveness.