Both TCP and UDP are similar in purpose as they manage the end-to-end transmisison from sender to receiver of individual packets that comprise a larger piece of data. The tradeoff between the two is reliability versus efficiency. TCP is designed for greater reliability. It is the protocol that involves sending an initial message to the receiver to announce the coming transmission, and acknowledgments sent from the reeiver to the sender upon receipt of each individual packet. These acknowledgments (or the lack thereof) allow the sender to automatically resend potentially lost or damaged packets.
In contrast, UDP is a streamlined protocol that emphasizes efficiency. Packets are simply transmitted by the sender, without any care to track the successful deliver of those packets. If packets are missing, the receiver must either cope without them or use other means to explicitly request that the sender retransmit data.
Typically, a message is only useful to the receiver if all packets are accounted for, and so TCP is most often used for Internet traffic. UDP is particularly appealing for applications like streaming audio/video where bandwidth is important and where "lost" packets can be ignored.
Email
definately TCP, as all packets are signficant and
reliability is important.
A query to a Web Server
typically TCP, but a reasonable argument could
be made for the use of UDP. Requests are generally
small messages and if those packets are lost/damaged
on the way to the server, we might rely upon the user
to explictly resend the query (as is often done when
delays occur while browsing the web).
Note that UDP is the standard used for queries sent to a Domain Name Server.
A radio broadcast
A classic use for UDP.
Purchasing a song from the iTunes store
TCP. In this case, the user would like to get
the entire song file in its entirety, and so
reliablity is most important. Bandwidth is
signficant, but the purchased song is not being
listened to in realtime.
Sending a "Text Message" to a phone
Depends upon software, but typically TCP.
Still, since text messages are presumed to be small
and thus fitting perhaps in a single Internet packet,
a good case could be made for the use of UDP.
However the efficiency for transmitting text messages
is not a significant bottleneck and the use of TCP
provides acknowledgment reliability that a message has
been delivered.
answers will vary.