Both are transport protocols in network technology.
TCP:
- Builds up a connection between sender and receiver
- Only when the connection is stable, data is exchanged
- Each TCP packet can be up to 14 kb
- TCP is used for HTTP, SFTP, SMTP etc.
UDP:
- No connection is established
- Thus, UDP is faster but less secure
- UDP is commonly used for DNS (usually), DHCP and VoIP - everywhere, where performance matters