Matchlock Muskets took a long time to reload and many were very inaccurate, so army tacticians typically deployed musket-men in formations to maximize firepower.
This tactic was pioneered by Maurice of Nassau, who taught it to Dutch troops in the Eighty Years' War. It was originally known as the countermarch, where troops were arranged in lines up to twelve, but more usually eight or six deep. After the front rank fired it would file away to the rear to reload. Gustavus Adolphus of Sweden made two important advances in the use of this tactic. First, he simplified and standardized reloading, then drilled his musketeers ceaselessly until they reloaded in action by reflex, without becoming distracted. Second, he pioneered the use of the volley or "salvo" as an offensive tactic for Swedish infantry in the Thirty Years' War.
Because of the musket's slow reloading time it was necessary until 1700 or later to use pikemen to protect them from cavalry. After the invention of the bayonet and flintlock musket, infantry were no longer equipped with the pike and their firing formations were reduced to three ranks deep. By having the front rank kneel, all three ranks would be able to fire at the same time. This allowed all the men in the unit to fire at the same time, unleashing a withering volley that would slam into the enemy. However, they had to be fairly close for the fire to be effective.