The first thing to grasp is that the camera only has 3 properties to control the photographic exposure* - Aperture, Shutter speed and ISO.
That's it, nothing else.
So when you are shooting in either full automatic mode or a semi-automatic model (like aperture priority or shutter priority), the camera is controlling one or more of those values all the way up to controlling them all (full auto). As noted by the others above ,the meter inside the camera aims to get everything to a set grey value** of exposure.
However in many light conditions the camera meter is not perfect and it can be tricked. A common example is taking a photo of a snowy landscape. If you let the camera do the exposure itself it will generally render the scene very grey, not white. It basically ends up underexposing the photo because there's all that bright white snow everywhere that its trying to get to grey with.
Another common one is bright sunshine where you might notice the highlights of a scene getting clipped (overexposed) as whilst they are part of the scene, they are far brighter than the general elements in the scene.
Exposure compensation is your means to tell the camera to either over or under expose from its meter reading using the setting(s) that it has control over. To tell it to overexpose a little when shooting in snow or to underexpose in bright conditions.
In your flower above you've got some highlights on the upper portions of the flower which are indeed quite a lot brighter than some of the lower and middle points of the flower. Therefore using a little underexposure has likely helped darken those highlights and stop them blowing out.
In editing you do have some exposure controls, however the limit with them is that they have to work with whatever data your camera captured at the time of taking the shot; they can't "add" data if none was recorded (full under/over exposure). Now the limits for this have increased over the years as digital technology has advanced, indeed the ISO invariant sensors on the market have really opened up those limits into the extremes. Things that 10 years ago which were impossible. So in some sense you've got a lot more freedom today to "make an exposure mistake" and still have data to work with in editing. However its still good practice to "get it right in camera" as that gives you the best data (exposure) to work with. It also is morally boosting when you're glancing at the back of the camera and helps cut down on editing work.
*strictly speaking its 2, but 3 is generally easier to wrap your head around in a practical sense of how you interact and work with the camera.
** 18% grey is often quoted, though I'm led to believe that this is not an industry standard with digital cameras and that it can vary. However for the vast majority of people the actual value doesn't matter, only that its the same value with the same camera each time.
Tools of the trade: Canon 400D, Canon 7D, Canon 70-200mm f2.8 IS L M2, Sigma 120-300mm f2.8 OS, Canon MPE 65mm f2.8 macro, Sigma 150mm f2.8 macro, Tamron 24-70mm f2.4, Sigma 70mm f2.8 macro, Sigma 8-16mm f4.5-5.6, Raynox DCR 250, loads of teleconverters and a flashy thingy too
My flickr