The how-it-works part of CarPlay is pretty simple, which is just how Apple likes it. Take your iPhone 5, 5S, or 5C and plug that sucker into the car's Apple-ready interface with the Lightning cable. Voila! Your car is your phone, just like you always wanted. The 21st century has arrived. The car's computer doesn't do the heavy lifting of running iOS; it has other jobs to do, after all, like reading information from the sensors to keep your ABS working or making sure your airbags inflate when you hit the car in front of you while you fight with Spotify over which Maroon 5 playlist you want to hear. Your iPhone runs the entire operating system, which is what it was built to do.
That means the apps have to be installed on your iPhone in order to see them on the car's interface in the console. But unlike that rigged-up system you've got going now with your stereo, your phone and about seven different cables and cords, CarPlay completely integrates the car and the iPhone. It works natively with the car's controls, like volume, so you don't have to fumble for the phone to make changes. It also works with the touch screen, so the glass in the console works just like the glass on your phone.
Not all apps can run on CarPlay; as usual, Apple will have final say on what's cool and what isn't. (Cool: black turtlenecks. Not cool: Google.) Really, the app selection comes down to safety. The idea of CarPlay, and almost every in-car entertainment and communications system, is to minimize distractions. At least, that's what all the tech makers say. In any case, it's very unlikely that Apple will make it okay to play Candy Crush or Flappy Bird while you're driving. Music, navigation, and anything that lends itself to hands- and eyes-free use will be cool, because your hands and eyes should be driving. Not dealing with that Maroon 5 playlist business. Seriously.