There are several things that can alter how long you can record for:
Quality: Find out what quality your camera is recording in. If you're recording in HD then it will take up incredibly more space than if you're recording in low quality (320 x 240). There are generally a few options to choose from, which can be changed in your camera's settings menu.
Storage Size: Most cameras use a type of memory card to record onto. Sizes can vary from 1GB - 128GB, but check your camera's manual as different models have varying capabilities (some will only be able to use up to 16GB memory cards for example). You may also find that your camera has some internal memory.
Below shows an estimated table of how long you can record for when recording in MPEG-4 (.mp4):
|Video (HD MPEG-4)||Fine||Normal||Low|
|1GB||10 minutes||15 minutes||22 minutes|
|2GB||20 minutes||30 minutes||45 minutes|
|4GB||40 minutes||1 hour||90 minutes|
|8GB||80 minutes||2 hours||3 hours|
|16GB||160 minutes||4 hours||6 hours|
|32GB||5.5 hours||8 hours||12 hours|
|64GB||11 hours||16 hours||24 hours|
|128GB||22 hours||32 hours||48 hours|
Please Note: To prevent overheating, most cameras will only allow you to record 2GB at a time (Standard Quality: 7 minutes - 15 minutes). Generally you're able to continue recording straight after.