It looks like an infected wound, it could have been started by allergies, bacterial/fungal infection or a tick among other things. i would probably start by applying an antibiotic cream on the wound 2-3 times a day and see if it gets better within a week, if it doesn't get better- i would recommend having it checked by your vet.