A salamander is both a mythical and real creature. The name 'salamander's derived from the Greek term loosely meaning 'fire lizard'; the real animal being an amphibian, and the mythical a fire dwelling lizard.
Salamanders have been said to be able to both create and put out flames, and in some cases are fire themselves. However in some stories they are merely fire resistant. In Faery legend, salamanders are credited with having taught the first humans how to make fire; however, there have also been versions of their origin saying they are composed by glass blowers who kept their furnaces stoked for several days and nights. They are often described as small lizards, but have also been known to be depicted as small glowing lights, and on rare occasion traditional faery-like humanoid beings.
The most likely base for their legend is the real life salamanders whom are known to sleep and hibernate among logs that were then picked up and used to fuel fires. As a result of being tossed into a roaring inferno they would wake up and scamper out of the fire. To the unknowing camper they would seemingly appear from the flames.