Earth wasn't always the only water-world in the solar system. Mars also appear to have started out wet 



but, as conditions changed, Mars lost its oceans.

So, how has Earth managed to avoid a similar fate?



Doesn't the Giant impact hypothesis explain the origin of the Earth's core (geomagnetic field) activities which help keep the planet warm?



The Earth's climate isn't quite as stable as you think. The Earth's climate has toggled back and forth between a greenhouse Earth and an icehouse Earth for the last 600 million years or so. During the icehouse Earth phases, the climate can enter an ice age, an extended period of time during which the climate in oscillates between glaciations and interglacials. We are currently in the midst of an interglacial period of an ice age. On the flip side of the icehouse Earth climate, dinosaurs and tropical plants lived close to the poles when the Earth was in a greenhouse phase.
In the past, there was a third climate phase, snowball Earth, which made the icehouse Earth look mild in comparison. Even during the worst glaciation, ice rarely reached closer than 40 degrees latitude of the equator. During snowball Earth phases (that last of which ended over 600 million years ago), ice reached well into the tropics, and possibly all the way to the equator.
One of the open issues in paleoclimatology is explaining why the early young Earth wasn't perpetually stuck in the snowball Earth phase. The Sun's luminosity has been growing in intensity since it formed. Sunlight was only 75% to 85% as intense when the Earth was young as it is now. So why wasn't the Earth permanently frozen long, long ago? Explaining why this was not the case (and geological evidence says it wasn't) is the faint young sun problem.

Regarding Mars, that's fairly simple. Mars is too small. Mars's core froze long ago Mars magnetic dynamo stopped operating long ago, and if Mars ever did have plate tectonics, that process stopped long ago. The end of plate tectonics stops any outgassing that would otherwise have replenished the atmosphere. That Mars is small means it has a tenuous hold on its atmosphere. The loss of a magnetic field (if it ever had one) would most likely have exaggerated the atmospheric loss, particularly if this happened when the Sun was young and had a much greater solar wind than it has now. The combination of the above means that even if Mars was habitable long, long ago, that habitability was rather very short lived.
Regarding the giant impact hypothesis, you have it exactly backwards. Look to our sister planet. Venus has a very thick atmosphere and as a result has surface temperatures higher than those on Mercury. The giant impact hypothesis offers one explanation for why Earth is not like Venus. If it wasn't for that impact, the Earth would still have a thick primordial atmosphere and we wouldn't be here. Our planet would be uninhabitable. Mars would be habitable if it was the same size as the Earth or Venus and if it had a Venus-like atmosphere.

Update: Regarding Anthropogenic Global Warming
A number of comments has taken this answer to be proof that anthropogenic global warming is not happening. To the contrary, it most certainly is happening.
As an analogy, consider a farmer who takes a trip to the Grand Canyon, then Badlands National Park, and then the Channeled Scablands in eastern Washington state. The farmer can rightfully conclude that nature has destructive capabilities that can far outdo even the very worst of farming practices. He cannot however conclude that poor farming practices do not cause erosion based on the existence of those remarkable records of natural erosion.
The extent to which anthropogenic global warming is happening and what that means to humanity -- that's a different question and should be asked as such. What the long term variations in the Earth's climate as described in this answer mean to humanity, well that too a different question.
