To communicate with another host (on the same LAN or remotely), there are two pieces of information that you need to know. First, the IP address and the MAC address where you want to send the information.

Remember:

MAC - OSI Layer 2 IP - OSI Layer 3 TCP - OSI Layer 4

The IP address is always Layer 3. The MAC address is always Layer 2.

If you hear the term Layer 2 switch, you know it will route frames based upon MAC address while Layer 3 will route according to IP address.