When I want to say "I like something", I would like to know which of the above fits which situation.
I would like to add some nuances to the answer of Janka.
It is correct that the subject in question gives away the emphasis. But it can be explained in another way as well. I think it is best caught in parallels to the English expressions to love sth., to like sth. and sth. appeals to sb.: It is about gradients of personal involvement.
Ich liebe das
The use of love emphasises that the object or person described is probably at the top or in the top three of my preferences. I would do basically anything for it or her.
Ich mag das
This emphasises that it is still me that has an inherent positive inclination and attitude towards something but not quite as strong as in situations where I would use love, i.e. that I have the tendency to do something because I like that thing (or person). In my priority list of preferences in the corresponding category, it probably is in the upper third.
Mir gefällt das
This emphasises that although I am not necessarily personally involved to an extent that makes me want to act in a certain way, it appeals to me, i.e. my mostly aesthetic gut-feeling induced by being confronted with it or her is positive. Maybe I am not even clear about where to place it in terms of preferences among other things that appeal to me. In this sense, I am more detached from the object I am describing.
On facebook, the English "Like" becomes "Gefällt mir", which seems to run against the suggestions of this answer. I would argue that the German term catches the personal stance and involvement much better. In the end, the like-button mostly corresponds to "well, yeah" rather than "I really like the content", i.e. an immediate gut-response.
Look at the subjects:
Ich mag das.
Mir gefällt das gut.
These are almost the same, but mir gefällt … has a more distant view because das (the thing in question) is what drives the action in the second sentence. I (mir) am a mere receiver of an impression. It's easier to step back from that.
Mir gefallen diese Schuhe. — Die kosten 300 Euro! — Oh, das ist ein bisschen teuer.
Aber ich mag diese Schuhe. — Du willst sie wirklich haben, ja? — Ja.
As Robert wrote in the comments, it's uncommon to take this step back from everyday things or things that you already have.
With persons, there are even more nuances:
Ich mag Katrin.
I like Katrin as a friend, or as a lover.
Mir gefällt Katrin.
In most circumstances: Katrin is my favourite (of a selection).