It sounds like you may have a nevus on the surface of your eye. A nevus is commonly known as a "mole" and it's a collection of pigment containing cells called melanocytes. A nevus or mole in the eye is very similar to a nevus or mole anywhere else on the skin and doesn't necessary indicate a serious problem.
That being said, it would be important to have your regular eye doctor
or primary care doctor
take a look at the spot, because there is no way to confirm this diagnosis over the internet!
Also, rarely, a mole or nevus may be a risk factor for the development of a serious type of cancer known as melanoma. This is especially the case if the nevus is new (meaning, not present earlier in your life), or if it is rapidly growing or has irregularities in terms of either its border or color distribution. Your doctor will be able to take a look at the area to see if there is any concern for melanoma. If so, you will definitely need to have the area biopsied to rule out this possibility.
Regardless, the first step is to call and make an appointment with your doctor!