I'm glad you came here to get advice on how to help your cat. You should probably take him to a good vet as soon as possible, and get him some relief from whatever is ailing him. A cat that is scratching his ear a lot is in quite a lot of discomfort and is not a happy kitty. So you need to do that as soon as possible.
Although he does need to go to the vet, the good news is that the vet will be able to treat him and restore him to his usual self. Ear problems do arise, but they are very treatable!
Please let us know how it goes. You and Mr. Kitty will both feel so much better when he comes home from the doc!