This is called mental imagery. It is a therapeutic tool that psychologists use to treat physical illnesses e.g. children with leukemia are taught to close their eyes and to visualize an army of special soldier-cells destroying their cancerous cells.
Imagery is a higher function of the human mind. Most people see images when they close their eyes e.g. they see images of people, animals, the ocean, mountains, drawings, etc. Also, people see images of the pages of books when they close their eyes which is called a "photographic memory" and is not unusual or extraordinary. Many students ace school exams by studying before bed and then closing their eyes and recalling all of the information on each page they've read. Most people don't consciously remember doing this because it is just a natural ability that most people perform unconsciously. In your case, you are conscious of the fact that you can see images of people when you close your eyes.
If the images are disturbing you, then perhaps you should eliminate whatever is causing the images e.g. if the images are of people on the television or in movies then you should avoid watching TV and movies especially before bed-time. Avoidance of causative factors is an effective tool for most pathological conditions.
Doctor (MD)
Diplomate, American Board of Quality Assurance & Utilization Review Physicians