The USB specification states that cables should be no longer than 5 metres (16 feet 5 inches), but most cameras have cables which are much shorter than this.
If your cable is not wired directly into the camera then you simply buy a 5m cable and use that. If the cable is wired directly into the camera then you could buy a USB extension cable (sometimes called a passive extension cable, to differentiate it from an active extension – see below), but be careful that the original cable and the extension do not exceed the 5 metre maximum.
If you need to go beyond 5m then you can do so by using what’s called an active extension cable. These include some electronics which boosts the USB signal so it can travel another 5 metres. You might think that this means you could simply plug lots of active extension cables together and create a cable of any length, but that won’t work. There’s a limit to how many active extension cables can be plugged together – this limit actually depends on other things (such as your computer), but generally you’ll not be able to use more than two active extension cables and we’d recommend only using one. But that still gets you a 10m cable, which should be sufficient for most situations.