Thanks for using Petco Pet Education Center, formerly Petcoach! This is likely due to an ear condition such as ear infection or ear mites for instance making him itch and cause self-trauma. However, this could also be something like allergies. This cannot be diagnosed just based on a picture and would require a veterinary evaluation. I recommend you consider taking him to a veterinarian for further assessment and treatment. The issue could be identified and treated. Good luck and have a great day!