That looks rather nasty! Since it is red, it could mean there is infection, so nothing to take lightly (not saying you are!). It could have originated from a wound, or could be an allergic reaction to something, or other reason(s); best to have kitty checked out by a vet right away before it gets any worse.
I'm gonna take her (apparently a him!? Neighbour said it is a boy.. my whole life has been a lie) to the vet today. Hopefully it won't cost much as I'm a student with barely any cash as it is.
So far as I can tell from the photo it looks rather like an abcess which are easy and cheap to treat with antibiotics. However a photo isn't the same as seeing the cat, plus I'm not a vet. The vet can tell you what sex your cat is as well, and if your cat isn't neutered yet talk to the vet about that as well.