Meta Interview Question

How does 2 devices communicate in a network?