CEF is enabled in software, and switches packets at interrupt level. It maintains a FIB (forwarding information base) consisting of all of the prefixes there is a route to, and an adjacency table to store layer-2 information for all adjacent routers.
In MLS, the process that occurs at interrupt level in CEF is done by hardware ASICs, taking the load off of the CPU, and enabling higher forwarding rates.