Sometimes when dogs get excited or see someone they really like, they may shake their head or the whole body to express that excitement. This generally isn't a problem, unless the dog has particularly floppy ears the ends of the ears can sometimes smack into the head too hard and cause splits and cuts!