An emulator is hardware or software which simulates something else. For instance, a Gameboy emulator would be something which emulates a Gameboy. A computer emulator can execute programs written for the emulated computer - from the software's perspective, an adequately implemented emulator is indistinguishable from the actual computer.
Hardware emulators are used to develop and test software for CPUs which are under development. Software emulators are used to run software written for one computer on another computer. A major use of software emulators is to run software from obsolete systems.