mag is used to say that you like something or someone.
for example...
I like him. Ich mag ihn. Ich mag Brot. Ich mag Kaffee.
Also note it takes the accusative case.
conjugate mag in the following way. ich mag, du magst , wir mögen, Sie mögen, ihr mögt, er/sie mag
there is also past tense, hat gemocht and simple past mochte,
ich mochte Kaffee. I liked coffee. Ich mag Kaffee.
gern is used for when you like doing something.
Ich spiele gern Tennis.
Ich koche gern.
note that gern comes after the verb*
or if you want to say you don't mind doing something...
aber gern! or just gern.
und so weiter.
gern sometimes appears as gerne, which I don't think changes anything.
I hope this helps and maybe any native speakers can clarify anything that I have missed.