Think of your camera sensor as your eye. You can see some detail in shadows once your eye has adjusted to the gloom but you can't see into bright sun without shading your eyes. The range of light is too great for your eye to cope. The same happens with a camera sensor. Shooting in RAW mode allows your editing software to pull out some detail from the dark areas but overexposed highlights are beyond the range of the sensor and whatever is there is just bright white and lost.
This is why photographic books tell you to expose for the important highlights in your shot. You can vary the aperture, the shutter speed or adjust the EV Compensation setting to do this. If your highlights are overexposed then dial in a -ve value.
Contrary to expectations, for a really bright scene (like snow or a bright beach and sea) you may need to set EV compensation to a +ve number. This is because the camera's meter is fooled into thinking your scene is mid grey when in fact it is white. Likewise for a dark scene, such as a very dark room, you need to dial in a -ve number.
If you are unsure about how much to compensate, you can use the Bracketing feature on the camera to take a series of underexposed and overexposed shots and check them on the LCD.
If the exposure range of a scene is still too much, try using a graduated filter.
It is important that you try to correct exposure in the camera first because when you get home, only the photos you have taken can be adjusted and if they are overexposed, there is very little you can do to recover detail. It is better to slightly underexpose than overexpose.