Your dog is suffering from skin disease. It is better if you take it to vet. Mostly, pets suffer from "Dermoid Sinus". This is a skin disease. In dogs it appears on dorsal area. This is like an infection. It can be cured in early stages by using antibiotics. But if this gets serious, it needs an operation to remove it.
It can be "Lipoma" so you should take it to vet for biopsy to confirm this disease. It can be removed easily as it occurs due to some allergic diseases. In serious conditions your dog needs surgery to remove this tumor.