As tuxian has already said TCP is a connection orriented protocol while UDP is a connectionless.
Let me explain this a bit.TCP is virtually what is called a three way handshake.The analogy here is,when you want to make a telephone call you first dial the number[intiatiating the connection] with the appropriate prefix code ,the call takes place[connection],the person at the other end picks up the phone & you say hello.[connection made,send data]
Analogy w.r.t UDP,consider calling someone in a busy market,there is simply no guarantee that the other person will hear you.
The analogies I've given above,you'll find these in a variety of books.
TCP produces much overhead than UDP.UDP is deployed where the delivery of the chunks of data is not guranteed & fast delievery of data is utmost required where as in TCP the data is transfered to the other end & is checked whether the proper data[CRC check] has arrived then it is assembled in a proper sequence.If any part of the data is missing the host at the other end requests for sending of the data again.
So if you are a programmer two things to keep in mind,if data delivery is not important then opt of UDP or else stick with TCP.