There are many variations on the shapeshifter concept throughout mythology. In fact, it is such a powerful archetype that the term "shapeshifting" can refer to several different variances in mythology, both figurative and literal. The type of being we are talking about here is a specific type of creature found throughout different mythologies but defined by a single united theory.
While many of the ancient gods and goddesses regularly performed physical transformations, they are not considered "shapeshifters" by this definition. The creature known as The Shapeshifter is specifically a human who can willingly take the physical form of one to several animals while maintaining their human consciousness. This precise definition is of great importance, as there are other human-form-to-animal-form transformers in myths and legends that do not match this criteria. In order to easier identify this specific creature, I will refer to it from here on as "The Shapeshifter".
One major trait of this being is that it transforms at will. It does not automatically change forms in full moons, when immersed in water, etc. They can stay in their human form indefinitely, and many don't even know they have this ability during early childhood (it usually first appears during the teenage years). Though their transformation is willful, they can "accidentally" cause transformation by losing control of their emotions, particular anger.
Some Shapeshifters of this kind can transform into multiple animal forms while others can only transform into a single form. All members of this race begin as single-form shifters. It is not known why some can change into multiple forms and some into only a single form throughout their lives, but it appears to be genetically pre-determined.
A good example of these different forms of The Shapeshifter show up in popular vampire fiction. The Twilight series features Shapeshifter Wolves - humans who are born with the ability to transform into wolves at will. In contrast, the Trueblood series features Shifters who can transform into just about any animal they are familiar with. Both of these types of creatures are considered The Shapeshifter as they both fit the requirements of this type of being. In contrast, consider the werewolf, a human who can also transform into a wolf - but the transformation is not under their control, nor do they maintain their human consciousness. These seemingly small differences are actually very important distinctions between The Shapeshifter and most of the other beings who can change physical form.
In many myths magic is used to transform one creature into another against their will, such as the famous legends of "The Frog Prince" or "Beauty and the Beast". In other myths gods, goddesses, wizards, witches, and other beings with mystical powers can magically change their forms, but still they are not the same as The Shapeshifter. When mystical, magical, or godly power is used for the transformation, it can indeed be considered the shifting of one's shape, but every creature who can change shapes is not necessarily a "Shapeshifter" by definition.
In modern mythology, there are creatures best known as "Reptilian Shapeshifters" that are believed to be a race of aliens who have infiltrated governments around Earth in human form. Though they can also change form at-will and maintain their consciousness, they fail the test of The Shapeshifter as they transform from reptile-to-human form and not the other way around. Sorry, Reptoids, you'll have to get your own web page.