More layers of management between the upper-level management and the workers equates to a taller organization. If there are only a handful of layers, then it is considered flat.
There is no specific number of layers that makes an organization tall or flat, but in general the factors that increase the layers include more employees, government regulations on the industry, and increasing revenues.
More management layers can be considered a bad thing, as they make an organization slower to adapt to changing market conditions and can result in fewer profits as the labor costs go up. These downside factors are often cited when companies announce layoffs while trying to retool an organization into a flatter structure (typically after a bad run of fiscal results).
On the other hand, having more layers allows for the senior managers to have fewer direct reports, which can theoretically allow them to pursue more difficult strategic initiatives for a company. In flatter structures managers may become distracted by day-to-day issues that could have been handled by middle managers. Additionally, having clearly defined layers may allow employees to climb the ladder with clarity on job responsibilities and salaries, and allow the company to speed up hiring for jobs that have been more narrowly defined in a taller structure.