It's an electronic device that can be a stand alone component or part of a larger device like a mixer.
It's design purpose is to raise the weaker level of microphones and guitars up to an electrical equivalent to what a standard line level signal would be such as a keyboard.
Many pre-amps have gain controls on them to adjust for the different electrical sensitivities of different microphones and guitar pick ups.
They can range wildly in price and in sound quality depending on how refined a sound you are looking for.
As an example, a cheap pre-amp could cost as little as 2 dollars when it is part of a larger circuit like a computer sound card or a small hand held tape recorder that has a microphone input connection on it, all the way up to a stand alone pre-amp that runs into the thousands of dollars, with exotic construction designs by celebrity designers like Robert Neve.