Tcp and udp work at the same level, they both carry data over IP (internet protocol).
However, tcp is a connection based protocol while udp is connection less. What this means is that tcp establishes a ("virtual") connection to the remote host before sending the actual data packets.

Both tcp and udp send data in chuncks called packets (however called "datagrams" in udp).
However, once a tcp connection is established, the tcp stack (the stack is the piece of software that manages the transmitions) handles all transmition errors by itself (for example if a packet is lost on its way (for whatever reason), the stack will automatically resend it...).
Udp does not have this capacity. If a packet is lost, you won't know about it. Thats why UDP is called "unreliable". Udp is however faster than tcp because there is not the overhead of error checking and etc.

In an analogy, tcp could be compared to a telephone call while udp would be a pager...

So, tcp is used in things like web browsing, telnet connections, ftp transfers and etc. where you can't afford to loose data on the way...
Udp is used in things like streaming media (realvideo...) networked games and etc. where losing some data is acceptable: if you lose a few bytes of streaming media data, it will just sound slightly distorted; in games (like first person shooters), skipping one player position update can be anoying, but not critical to the game's continuation...

Ammo