A Hug gives back some of your Visit Actions for the visit. Remember, you can only hug 1 Neighbor everyday.
Visit a Neighbor and you can click either the Give Hug button found beside the Neighbor's Farm Name or when hovering the mouse on the Neighbor's Avatar.
You may see visitors on your farm with special profile picture frame. Just hover over the visitor and click the Receive Hug button to get a Hug.