Most communication between computers cannot be fully transacted in one packet. For example, sending a megabyte file will require breaking it into many packets, which allows other users to get some time on the wire and which also keeps any errors from causing the one huge packet to be wasted.
There are two main approaches to sending a message that is broken into many packets over a network. The first is called connection-oriented because is based on the idea of a telephone connection. Communication that needs to be totally reliable, such as sending files or remotely logging in, uses connection-oriented protocols, such as TCP.
The alternative is connection-less in which the message is broken into packets, called datagrams, and are sent over the network. The timing of their arrival and even the loss of a few of these are not critical. Some programs that send radio broadcasts over the Internet use this because the corruption of a few packets due to bit errors will alter the sound a little but it will still be largely recognizable.
If connection-oriented protocols are like telephone conversations, then connection-less protocols, such as UDP and IP, are like "snail mail." A packet is a like a single letter. It has the address of who should receive it, and often the address of the sender. The USPS makes a "best effort" to deliver the letter, but sometimes letters get lost or delayed and the receiver would never know about it. However, in a telephone conversation, there is a steady stream of information flowing in both directions and any omission or break or out of ordering is audible and detectable by the receiving. Moreover, there is a complicated protocol used to establish the connection in the first place and a separate protocol for terminating the call. As the call proceeds, both sides give signals to each other if they don't understand something or if they want the other end to pause for a moment. All of these elements are present in connection-oriented protocols.
Just to recap, connection-less protocols are used when there is only one short message to send or when the data stream has a lot of redundancy in it or if it is not strictly necessary that it entirely reach the other side uncorrupted. Connection-oriented protocols are used when the integrity and wholesomeness of the data stream is very important, but there is more cost to setting up, maintaining and tearing down connections than just sending a single datagram.