Byte ordering refers to the ordering of bytes in memory for numeric values. There are two types: network byte ordering stores the most significant byte at the lowest memory address, while host byte ordering is the opposite. Sockets provide an interface between processes and the transport layer, allowing processes to communicate over a network. Common socket types are stream sockets for reliable connected communication using TCP and datagram sockets for unreliable communication using UDP. Functions like bind(), listen(), accept(), send(), and recv() are used to set up and communicate over sockets.