A private eye is a detective who works for private customers, rather than with a police department. If a local dog thief steals your poodle, you might want to hire a private eye to investigate.
The informal private eye comes from private investigator and its frequent shorthand, PI. Private eyes are probably most common in detective novels, although they are frequently hired (in real life) by lawyers to investigate suspicious insurance claims and divorce cases. Investors sometimes hire private eyes to examine businesses before they invest money, too. The earliest known private eye set up shop in 1830s France.