While I'll refine this technically in more detail later on, the basic idea behind MPLS is that with IP based switching of packets, the routing table lookup is a lengthy process with the longest prefix match algorithm. The routing table must be looked up for every packet destination and the routing table entry that matches to the maximum number of bit positions will determine the next hop neighbor and hence the outgoing interface. While hardware based caching is done to increase the speed of this process by different vendors, with loaded routers, this is going to be sub optimal. So, the idea is that you assign the same tag to all destinations that you switch in a similar manner. Now, even if this tag value is a 32 bit number, the comparison will be orders of magnitude simpler than comparing with all routing tale entries and determining the longest prefix match.
This idea was carried in from the world of deceased ATM, and was implemented in various forms by different vendors such as tag switching by Cisco Systems, and later IETF standardized it to MPLS, which is vastly similar to tag switching, yet different in subtle ways. Also, there exists an open source implementations of MPLS to run on Linux, that I am aware of and is availabe at SourceForge. There might be other implementations and implementations for other OSs as well, but we're not concerned with that.
Note that MPLS does not eliminate the need for a routing protocol. Routing tables still need to be built, but the switching of packets is much faster.