A specter means a ghostly apparition, a ghost itself, or simply an idea that people find frightening. You can give yourself nightmares if you listen to too many stories about ghostly specters appearing in dark windows.
Specters as fears are the kind that tend to loom on the edge of our minds, lying dormant for awhile, then raising their ugly heads. It can be hard to sleep if you think too much about the specter of a terrorist attack, or the specter that your blabbermouth cousin might spill the beans to your parents about the night you two took your dad's car without asking. The word can also be spelled spectre.