Yes, frogs can "hug" in a mating behavior called amplexus.
During amplexus, the male frog grasps the female around her waist. This is not a friendly embrace but a crucial part of the fertilization process. The male holds onto the female as she lays her eggs, allowing him to fertilize them externally.
Amplexus can last for varying amounts of time depending on the species. While it often lasts hours or days, some species, like Andean toads, have been observed in amplexus for up to four months! This extended embrace ensures successful fertilization.
Therefore, while not a hug in the human sense of affection, frogs do engage in a "mating hug" that's essential for reproduction.