Levels are a measurement of how strong a Pokémon currently is.
In the game
Levels are featured predominantly in the Pokémon games. They are determined by how much experience that Pokémon has. A Pokémon's level will range from 1 to 100. When a Pokémon gains a level, its stats increase by a small amount. It may also learn a new move or evolve.
A Pokémon's level will also affect its friendship, raising it slightly when the Pokémon levels up. This means that a Cleffa trained in battle will eventually evolve into a Clefairy, with its friendship going up slightly each level. Using Rare Candies will also raise friendship, though for a long time people thought it did not, due to a Pokémon's friendship also being raised by the large amount of walking.
The level cap is level 100. When a Pokémon has reached level 100, it cannot gain any more experience or level up. Due to this, level 100 Pokémon cannot evolve in any way which requires leveling up.
When a Pokémon is obtained in a trade, it oftentimes will not obey the player's commands if it is at too high a level. The Pokémon will either ignore orders and use a different move, do nothing at all and loaf around, hurt itself, or go to sleep. This can be corrected if the player has the proper Badges. Having fewer than two Badges means that no traded Pokémon whose level is above 10 will obey the player, while having all eight makes all Pokémon obey the player. The specific Badges that cause a rise in the level of obeying Pokémon can be found on their page, though they are typically the second, fourth, sixth, and eighth Badges obtained. Unova breaks this trend, with each Badge giving various levels of obedience.