TCP (Transmission Control Protocol) is a connection-oriented protocol that provides reliable communication between two endpoints. It ensures that all data is received in the order it was sent and requires acknowledgement of each packet to guarantee delivery. An example of a TCP protocol is HTTP, which is used to transfer web pages from a server to a web browser.
UDP (User Datagram Protocol) is a connectionless protocol that provides an unreliable communication between two endpoints. It does not guarantee that all data will be received in the order it was sent and does not require acknowledgement of each packet. An example of a UDP protocol is DNS, which is used to resolve domain names to IP addresses.