The basic technical answer is that a projector shines a light source through a spinning color wheel in order to produce an image. The image is generated through a connected device, like a laptop, smartphone, or USB drive.
Projectors can be placed on a flat surface or mounted on ceilings or walls—and, of course, aimed at a projection surface, ideally a screen.