Did you bang it somewhere? Are there lumps? Bruises? Getting your period soon? Hard to say with little details given.
If there's a lump and it hurts, it's probably a cyst. My mom gets them all the time. It's basically a mass of puss... it'll generally go away on its own, but sometimes it needs to get drained by a doctor (big syringe to suck it out).
If there's a bruise, you might have had some kind of 'trauma' to your breast which should resolve on its own.
This could be a symptoms of P.M.S.
I'd say... if the pain doesn't resolve in a week, go to a doctor to get it checked out. Breast cancer masses are rarely painful, and that is why screening is so important: women don't always notice they have them. If there's anything else suspicious about your breasts, other than pain, say, how they appear (inverted nipple that wasn't always inverted, unexplained rash, etc.) go to a doctor. It's the only way you will be able to find a conclusive answer.
Hi Tete, I have often suffered from pain on the side of my breasts from time to time. My checkups and mammograms conclude it is not due to any tumors, however, that doesn't mean yours won't so I recommend you notify your healthcare professional. Most often, I notice the pain returns after wearing an underwire bra for any length of time. You might try going without an underwire or a bra at all, if your lifestyle permits, and see if that helps.