There is the right way and the wrong way. Most cars have it the wrong way, they just disconnect the battery positive from the rest of the vehicle. The problem with this is that if the engine running and the car has an alternator, the alternator with keep charging even without a battery. So as a safety cut off, it does not work.
You need a double pole switch to break the current from the alternator also or run the wire from the alternator directly to the battery.