Like any given Pokémon game, you can evolve certain species of Pokémon into bigger and stronger forms. The same goes for Pokémon Go, but the process is slightly different than in the traditional games.
Whenever you catch a species of Pokémon, you'll receive Candy for that specific Pokémon. That Candy is super important, since you'll need a specific amount of that type to evolve a Pokémon. Sometimes, certain Pokémon will require certain in-game items or will need to complete a task in order to evolve.
Let's apply this to Inkay. Inkay is a squid-like Dark/Psychic Pokémon. It can evolve into a Malamar at certain levels in the original games. When it comes to Pokémon Go, you'll need 50 Inkay Candies in order to evolve. But this is where those evolutionary tasks come into play. The Inkay Candies are the first step. The second step is to turn your phone upside-down.
No like, seriously. Turn your phone upside-down. Even with the Candies, the Evolve button will only light up if you turn your phone upside-down. Once you do that, then surprise! You can finally get your Malamar!
This process reportedly reflects the process in the original games. When introduced in Gen 6 in Pokémon X and Y, evolving Malamar required players to turn the Nintendo 3DS upside-down to get Malamar. So, points for accuracy!
In terms of Pokémon lore, this works out pretty well. Inkay looks like a squid and Malamar looks like an upside-down squid. So, it basically makes sense that turning a Pokémon like that on its head makes for a new Pokémon!
That being said, not everyone playing Pokémon Go has a device with an internal gyroscope that recognizes when it's flipped upside-down. Pokémon Go developer Niantic acknowledged this when Gen 6 was brought to their game and promised to provide an alternative to evolving Inkays.
If nothing else, Niantic sure knew what they were doing when it came to designing Inkay for Pokémon Go!