A silly goat is trying to get an uninterested dog’s attention by licking him and making funny noises!!
Goats are extremely intelligent and curious. Goats are very often not given credit for being the smart and loving creatures they actually are.
Goats are goats, and they think and act like goats, and no other animal, but if you are unfamiliar with goats and how they think, you could think of goats brains as working kind of like a dogs, except they don't have the "I must please humans" thing that dogs have.
Older goats head butt to play, but more often to fight. They will fight between themselves to establish dominance and they will take "pot-shots" at smaller goats to show them who is boss. There is really nothing you can do to get them not to do this- it's what goats do.(Source)
This is one patient dog! Watch how he responds to this goat's playful but odd behavior.