Line switching is a technique developed for telephone networks that creates a connection between the sender and receiver. A single dedicated line is allocated exclusively to the communication and no other communication may have access to that line while it is in use. This approach delivers very high levels of guaranteed quality of service because the line is exclusive and dedicated to the communication.
The disadvantage to this line switched approach is that it is very resource hungry and creates the situation where when you try to make a long distance phone call there may not be a line available for you use. Unless the telephone company has made massive investments in putting many lines in place in every conceivable direction.
Analogy: if you wanted to drive from Cape Town to Johannesburg you would book the entire N1 between these two cities and while you were driving no other vehicles would be allowed to use any part of the road until you had arrived at your destination. It would be great, you could never crash into any other vehicles but imagine how inefficient that would be. With the thousands of cars that use various parts of the N1 each day can you imagine how long in advance you would have to book the road. It would be a very inefficient use of the resource.
Packet switching is an entirely different approach to moving data. The data that must be moved is broken down into small packets or chunks that are then each individually addressed and then released onto the network infrastructure. Each packet then effectively finds it's own way over the network to the destination where it can be reassembled into it's original state. Some packets may take much longer than others to arrive, they will not arrive in the correct order and some packets may never arrive at all.
The packets are all given a number which indicates their position in the sequence of the original file, the receiving end can examine all the packets that have arrived and then send a request back to the sender for only the missing packets and this will be repeated until the entire file is in tact at the receivers end.
Demonstration: http://www.pbs.org/opb/nerds2.0.1/geek_glossary/packet_switching_flash.html
Analogy:If you wrote a letter to you mother and placed each letter of each word that you wanted to send on a separate post card, each post card would have a number that told her the order that it was in and then all of the postcard addressed to her. The post cards would not all arrive on the same day, or in the correct order and some may be lost in the mail. The missing numbers would have to be requested by you mother and you would need to resend them (only the missing ones) until she got the whole letter.
Packet switching makes far better use of the available resources than line switching does. Line switching offers far better quality. It was not possible to use line switching on the data networks because they originally had to make use of the existing telephone system, which was already under heavy use. Packet switching allowed for the existing networks to exist. Even today we are all desperate for more bandwidth because there are not enough lines to satisfy our demand for data.