The answer is: by using a light meter. A light meter is a device that (like its name implies) measures light. There are two basic types of light meters, "incident" and "reflective".
We'll start with incident meters because we won't spend much time on them. Incident meters are handheld devices with a white globe on top (example picture below). If you've ever watched part of a fashion shoot on TV, you may have seen one of the photographer's assistants sticking this in front of the model's face repeatedly as they adjust the lights. This is because incident meters measure the light that falls on them directly, so they have to be placed where the subject is to get a useful reading. This works well for portraits, product shots, and anything where the subject is close at hand. Incident meters are not practical for landscape shots, sports, or anything where the subject is far away or moving.
To use an incident meter, you set the desired ISO on the meter, place it in front of the subject (white globe facing the camera), and press the button to make it measure the incident light. The meter then gives you a f/stop and shutter speed setting that should result in a correctly exposed photograph. The meter will also have a wheel where you can change either the aperture or shutter speed setting it suggested. When you do this, it will automatically adjust the setting you didn't choose in the opposite direction so the exposure will still be correct. This is useful when you need to use a certain aperture or shutter speed for creative reasons.
Now on to reflective metering. Reflective light meters measure the light that is being reflected off objects in the scene and enters the camera. While there are handheld reflective light meters, almost all modern cameras have built in reflective light meters. This type of built-in meter is often referred to as TTL metering (through-the-lens), since the meter actually measures the light that is entering the lens of the camera. Learning how to use this in-camera meter is absolutely essential to taking well exposed photographs.
So how does your camera's meter work?
Well, in its simplest form, the meter uses "average luminance". This just means it measures the total amount of light coming in the lens, and assumes that this light is evenly distributed over the entire frame. It then determines the exposure settings that would make this average light level come out a medium gray (more or less half-way in between pure black and pure white). The camera designers know that the the world isn't medium gray, but they are shooting for the middle ground to get you a decent exposure.
So how do you use your in-camera meter? If you are in Manual exposure mode, you should see a bar like this:
Ok, this is the entire control panel from the top of my D200, but see the bar in the middle, with the plus on the left, zero in the middle and minus on the right? That's what we're talking about. This should be visible somewhere on one of your camera's control panels, in the manual exposure mode if not others.
What this bar tells you is how over or under-exposed the meter thinks your image will be at your current exposure settings. In the picture above, the bigger hash marks stand for whole stops, the smaller marks for 1/3 stops. The "plus" side of the meter is overexposure (too bright), the "minus" side is underexposure (too dark). So at 125th of a second, f/5.6 and ISO 800 (ISO not shown here), the meter thinks whatever my camera was pointed at (the dining room wall?) would be 1 and 2/3 stops underexposed. Ok here comes the important part so pay attention:
The meter thinks you want everything (on average) to be medium gray. But what if your subject is very dark or very bright and you want to keep it that way? If you take a landscape of a bright snow scene, you want the snow to be white instead of dingy gray, right? If you take a picture of your black cat on your black leather couch, you don't want a gray cat on a gray couch either.
So how do you deal with that? If you know you want your scene to appear light-toned (bright), pick exposure settings that the meter thinks are over-exposed (towards the plus sign). If you want to make your scene dark, select exposure settings that the meter thinks are under-exposed (towards the minus sign).
THAT'S IT! This is something a lot of photographers never really get a handle on, so learn it now! There's some practice involved to get this figured out, so go experiment!