A surveillance camera often stores its video on a hard drive, rather than a tape, and it overwrites it automatically every so often. This way, you can just let the tape run for weeks without having to do anything yourself. The spy cam video can be accessed if anything happens, such as a break-in. As long as you get there quickly, you will still have the video that you need.
Exactly where the video is stored really does depend on the type of camera that you have. With some cameras, the hard drive is built into the body of the camera itself. This is the most compact setup. The problem is that a thief may be able to find the chip, take it out and destroy it. You will then not have any video of the event. The thief could even steal the whole camera to prevent you from getting the evidence that you need.
A better option, then, is to get a camera with a wireless transmitter that stores the actual data on a remote hard drive. You can then set up the receiver in a hidden location, such as a closet or even a safe. The thief might see the camera and cover it with a cloth, but you will already have a great video that can help the police officers break the case wide open. There is nothing that the thief can do to stop you, even if he takes a hammer and entirely destroys the camera.