I would say every 35mm SLR camera has a bulb or 'B' setting allowing you to keep the shutter open for as long as required. Compact cameras on the other hand don't normally have a bulb setting as such, although some models will expose the film for several seconds.
As for how long to leave the shutter open, it's probably best to bracket your shots. In other words try taking the same shot at different exposure times and see which one turns out best. If it's a static object, such as a floodlit building, then a TTL metering system can normally cope OK. Failing that, then exposure bracketing is the sure way to guarantee a decent photograph.