The method for selecting white balance (WB) will vary from camera to camera; consult your owner's manual (or search online...everything can be found online).
Most cameras have WB presets for different types of lighting, such as tungsten light, flourescent light, daylight, and shade. For the most part, these presets work pretty well. Each of these modes compensate for the inherent color cast that those types of light cause. For example, tungsten light (standard light bulbs) have a yellow/orange glow. When you select the tungsten WB preset, the camera adds blue to the entire image to counteract the yellow/orange cast. It's called white balance, because when everything is correct, anything that's supposed to look white should appear white (not yellow, not blue, not green) in the final image.
Just about all cameras also have an Auto White Balance (AWB) setting. The reliability of AWB varies from camera to camera. I think AWB tends to perform better in daylight settings than any other setting. Tungsten ligthing is usually the most difficult type of lighting for AWB to handle. You'd be better off using a pre-set white balance setting as mentioned above, or one of the settings mentioned below.
Some advanced DSLRs allow you to dial in a White Balance setting for a specific color temperature in Kelvin measurements. Measuring color temperature on the Kelvin scale is a very old technique, where "warm" light (yellow/orange) is low on the scale (candlelight around 2000K, bulb light around 2700-3200K), "cool" light (blue) is on the high end of the scale (cloudy around 6000K, shade around 7000K). Daylight is around 5200 K. Because you have a wide scale of Kelvin settings, this method is more flexible than the pre-sets.
Many cameras have a Custom White Balance (CMB) setting where you can take a close up picture (fill the frame and don't worry about focus) of something that is supposed to be color-neutral, and the camera will compenstate for any color cast that may be present. Even though it's called White Balance, that doesn't mean that you can only use something white to get a color reading. You can photograph something that is neutral grey. Neutral means that it doesn't have a warm or cool tint. A lot of things that are grey do have a slight tint to them, so you need to be careful when using grey to set white balance. I always carry a microfiber lens cloth that is both 18% grey and neutral. The fact that it's 18% grey is useful for exposure metering, and the fact that it's neutral means I can also use it for setting White Balance. Not all 18% grey cards are color neutral; read the fine print. Also, be careful when you use something white to take a White Balance reading. A lot of white stuff, especially paper, actually has a slight blue tint, so it's not really neutral. BTW, the reason a lot of white stuff has a little blue in it is that our eyes/minds perceive things as being brighter white when they have a slight amount of blue.
Some advance DSLRs allow you to fine-tune all of the above white balance settings. On my camera, for example, I can move a point on 4-quadrant graph where one axis adjusts for yellow/blue, and the other axis adjusts for green/magenta.
One of the biggest headaches when it comes to white balance is when you have mixed light sources in a scene, and each light source has a different color cast. For example, most office settings have flourescent tube lights in the ceiling, which cast a yellow/green tint (our eyes compensate for this somewhat, but the camera shows just how ugly it is when you don't compensate for it). If you took a picture of a person in such an office and used a camera flash, you would have different color casts in the image. The flash itself will usually be slighly cool (daylight). If you set the white balance to for the Flash, the camera will add a little yellow to the entire image to compensate for the slight cool cast of the flash. That means that all of the background and shadows, which are affected by the flourescent lights' color, will be extra yellow/green, beyond what it already was. If, on the other hand, you set the white balance to compensate for the flourescent lights, you'd have the opposite problem; the parts of the image that received light from the flash would be extra magenta/blue. One solution is to do selective color adjustments in Photoshop, but this would be too time-consuming an tedious. The better solution would be to gel your flash, so the color of the light coming out of the flash matches the color of the rest of the scene. Then, a global white balance/color-correction setting would work better. There are other options, such as upping the shutter speed to kill the ambient light and its color cast, so your flash would be the dominant light source, but explaining that option would take us out of the realm of White Balance and into exposure and lighting.
Lastly, I'd like to add that photography is part science and part art. Sometimes getting an exposure or a white balance settings "technically" correct results in a boring image devoid of any mood or feeling. Sometimes a technically correct white balance is actually distracting and ruins an image, because our minds recognize that the scene really should have a color cast. For example, if a scene is lit by candlelight or open flame, it makes sense for the light cast to be warm in color temperature. It might not "feel" right to see a picture of people huddled around a camp fire with neutral color. Take, for example, the images in the original post. The color-corrected image where the trucks and trailers are white may be an accurate representation of the color of the trucks. That is fine if the intent of the image is just to document "this is what trucks look like". The original image, with its color cast, has a lot more mood; I feel like I'm there and I can smell the exhaust. What I find interesting is that letting the mood through also allows more acceptance of other technical flaws in the image, such as the blurriness. That doesn't mean that one image is automatically better than the other. Art is subjective. The purpose of the image often dictates how color and white balance should be treated. A nice portrait in which you want to flatter the subject might do well if it were nearly color neutral, but only slighly warm (people tend to prefer a slightly warm skin tones).
Sorry for the long post, but I figure if this thread was started as a WB primer for newbies, I might as well add some information.