What to do depends on what you want to show. There's one exposure set if you want shadows to be lightened, another if you want shadows to be dark grey, and another if you want them to be full black. And no camera can guess photographer's will (wouldn't that be boring?)
As G_H states, the exposure metering mode used is fundamental. If you set it on average, you'll get the exposure for the whole scene, thus, camera's built in light meter will show 0 exposure value for your dark ambience. That means, if you set your camera so exposure meter is set on 0, ambience average light will be set as mid exposure, resulting in an overexposed photo. You can simply set exposure to a lower than 0 value, but, if I was you, I'd prefer setting camera mode to manual, and exposure metering mode to spot, then pointing to the illuminated part of the scene (assuming you have an scene where there's something barely illuminated and rest is obscure), and arranging camera settings so light meter is: at 0 if I want the illuminated to be at medium light on photo, or at around +1 if I want it to be taken as highlights. After doing this, I would frame and shoot.
When setting exposure on darkness, other factors as depth of field, iso noise and sensibility to camera movement must he taken in account, but that's something you'll easily find help about if needed.
Fortunately, we have digital cams and generous sd cards, so you can try as much exposures as you want.