TCP vs UDP
TCP is reliable: before sending data, it establishes a connection (the well-known "three-way handshake"), confirms every piece arrived, and resends anything lost. That reliability has a cost in speed and overhead, so TCP is used where correctness matters more than speed, loading a web page, sending an email.
UDP skips all of that. It just sends the packets and moves on, no handshake, no guaranteed delivery, no resending lost data. That makes it faster and lighter, which is why it's used where speed matters more than perfect delivery, video calls, online games, DNS lookups, a dropped frame or two is barely noticeable, but a laggy call is unusable.
This distinction matters for security too: a lot of scanning and denial-of-service techniques specifically exploit the differences in how each protocol handles unexpected or malformed traffic.