The ignition works fine when starting the car, however sometimes when I go to shut the car off the key just turns or gets caught and will not shut the car off. What do I need to replace, the switch, the cylinder or both?
Take out the cylinder and see if you can determine where the problem is. IIRC there's a tab that sticks out the back of the cylinder that engages the switch. When the pieces are apart you should be able to tell if the problem is with the cylinder, switch or both.
There's a trick to getting the cylinder out but if you have the shop manual the procedure is in there. Remember to disconnect the battery before doing anything. If you don't have the shop manual just do a search on ignition switch removal and you'll find the procedure posted here dozens of times.