A hug is usually a single action: you take someone in your arms, give them one affectionate squeeze, and then you let go. That's all. It lasts a second or two. It's something that you do to greet or say goodbye, or perhaps to console or congratulate someone. You can hug anyone - not only friends and family, but also classmates, team-mates and colleagues.
Cuddling involves sharing physical closeness, with repeated hugs and strokes over an extended period : you can cuddle someone for minutes or even hours. It's also quite an intimate exchange : apart from your partner/husband/wife/bf/gf, the only people you usually cuddle are babies and small children.