Flanking in Civilization 5 is a battle maneuver in which several melee troops on one side surround and attack an enemy - the attack then receives 10% bonus to combat strength. In order to activate the Flanking bonus, move at least 2 units onto tiles that are adjacent with the same enemy - every melee attack from any of these units will then benefit from a Flanking bonus. It doesn't matter what tiles exactly are your units occupying around the enemy, as long as they're right next to it. Flanking stacks with the 10% bonus to combat in the Honor policy tree for units on adjacent tiles.
Flanking also works the other way around - if the enemy has more than 1 units surrounding your attacking unit, the attack will suffer a -10% Flanking penalty.
Flanking is also a critical part of taking cities without Siege units. A fully encircled city becomes very weak to attack mostly due to the flanking bonus. In the long run, the city will likely fall due to resource deprivation.
On the tactical level of two or three units, the use of flanking is universally a good thing. Since there are no area of effect weapons besides Nukes in the game, bunching up the units rarely backfires, and they can use the very important Medic promotion to heal each other, making them much harder to kill. Finally, two or three units have better firepower and can overwhelm even more advanced units.
Flank attacks may also be performed on a more strategic level as opposed to a tactical level. In the strategic sense, flanking is when one army uses fast units (mounted, paratroopers, helicopters) to go around the front line of powerful defenders to hit the weaker ranged units (archers, artillery, AA guns) that support the front. That would open the tough frontline units to attack from both the front and the back, if the strategy works.
This strategy can backfire explosively, especially when the commander ordering the flank has incomplete intelligence. If the other commander has only a few defensive units that are not visible, the whole attack will probably force the enemy into a costly route, and possibly a counterattack. Even if the flanking commander does not encounter defensive units, if he does not destroy all or most of the ranged units in one turn, they will focus fire on the flanking units, probably destroying them. The strategy, like war itself, is risky.