
Food first as tatty says but otherwise, spinning is typically a compulsive behaviour linked to stress. It can simply be a matter of never having been taught an off switch but more likely is to do with an inability to otherwise cope with a spike in stress, be that good or bad - as you've described, he starts at certain events such as visitors or being left on his own (he probably hasn't been taught how to cope with being alone/not being given attention, hence the spinning).
Treatment I believe (not having dealt with this directly myself) is usually distraction when it happens, identifying likely triggers so you can reduce/manage them, providing entertainment such as kongs and treat balls, and appropriate exercise. It would be a job for an experienced behaviourist though I think, so they can spot what's setting him off and guide you through the process in person. Some spinning dogs need medication, if it's very severe - I know someone who took on a dog with very severe spinning (much worse than you describe I think) and with her, it's taken medication and a lot of behavioural work to help the dog.
I really would get help in for this dog.