It is likely from trauma of running into something or rubbing against something or getting bitten by something. There is nothing safe to give over the counter for cats especially being so close to the eye. All you can do is apply an ice pack to help with swelling. If it continues then you will need to see your vet for medication