Difference between TCP and UDP — when do you use each?

Technical