The term "spook" is a slang expression that has several meanings depending on its context. It can refer to something or someone that startles, scares or frightens others. In this sense it could be used as an exclamation when encountering something unexpectedly such as "Wow! That spooked me!"
In another usage, the term refers specifically to a ghost or spirit and is often used in reference to Halloween celebrations where people dress up as spooks. It can also refer to someone who works in intelligence gathering or espionage, particularly those working for covert government agencies such as the CIA. In this sense it could be used as a nickname for an agent, "That guy is a real spook."
Overall, the term has evolved over time and can have different meanings depending on its usage.