Some years ago I found a kitten in my yard that was no more than 3 weeks old. He looked as if someone had dragged him through the street or had gotten into some kind of fight. He was flea ridden, sick with a bad lung infection and had the worst ear mites I had ever seen before. It looked like he literally had mud in his ears. He was so pitiful and so cute, I ended up keeping him.
Despite all these things that afflicted him, he was cute and quickly very spoiled. The ear mites though were really bad. I learned that a very cheap way to get rid of these was a very simple and cheap treatment of vinegar. It doesn't get any cheaper than this. Most of us have a cheap bottle in our kitchen and is almost as cheap as baking soda.
Now as most people know, cats do not like to have their ears messed with. What I did with mine was swaddle him in a blanket like a baby and held his head down. Once you have your cat as calm as they can be, just pour the vinegar in their ears. They won't like it and they may hiss and meow loud but they will be so relieved even after the first treatment. You may need a dropper or a pipet dropper to do this and you can get one that is very inexpensive to drop it in their ears.
A lot of the black gunk will come out on the first treatment. I used paper towels and Q-tips to get out as much as I could being careful not to harm the inner ear of the cat. You can also turn their heads over onto a towel or paper towel and a lot will just drain out. This process should be repeated once a week for a few weeks to kill all the mites and make sure that they don't come back. Your cat may not initially like this, but once their ears are clear and no mites are breeding anymore, they will be so happy and you will have a lovable cat that doesn't scratch their ears to pieces.
Now, if your cat seems really infected from scratching you may want to bring him or her to a vet a get some prescription drops with insecticide and lotion to help soothe them but vinegar works wonders. Ear mites are highly contagious and can also spread to other cats, dogs or pets. In the event your cat has bad ear mites, you may want to quarantine your other pets or the cat that has the ear mites away from your other pets or treat them all with an ear cleaning. A healthy cat is always a much happier cat. As always, though, if your cat or pet seems really infected or sick, always seek a vet for them. This is just a really cheap route that worked for my cat when I had him.