As TwoPacks has pointed out, it is difficult and time-consuming to load and fire a black-powder weapon, whether it is a musket or a rifle. This had a profound effect on how they were used in battle.
The first hand-held long guns were clumsy, heavy and inaccurate. The earliest versions which were widely used were either wheel-locks or matchlocks. A wheel-lock used friction to create a spark which would light the priming powder and fire the gun. The matchlock used a burning piece of slow match (roughly speaking, this was a piece of small rope impregnated with tar and black powder--they were first designed to fire cannons, and were long used for that purpose by artillery and naval gunners, even long after flint-lock firing devices were invented). The slow match would be lit, and then pushed down into the priming powder when the trigger was pulled, in order to fire the weapon. Wheel-locks and matchlocks took from one to two minutes to load and fire. They were very heavy, and usually came with a prop to hold up the end of the weapon while the slow process of firing it was carried out.
In the image above, although you cannot see it very well, the soldier is using an arquebus (you can't see if it is a wheel-lock or a matchlock), and he is leaning on the stand in which the front of the weapon was rested while the soldier aimed and fired.
Obviously, this greatly limited the rate of fire of those who used the weapon. Originally, in fact, the arquebus was known as a "wall-gun," and was simply a very small cannon which was mounted on the wall of a fortification, or on wagon--it was in the 15th century that the weapon was re-designed for use by an infantryman.
In the 14th and 15th centuries, in the petty wars which plagued northern Italy during the Renaissance, the problem which any commander always faced was how to stop the charge of mounted knights. Now, despite what you see in the movies, cavalry did not charge at a gallop--the horses were already carrying hundreds of pound of man, armor and weapons, and wouldn't have held up. But even moving at a trot (which was about as fast as they usually got when charging), they could cover a lot of ground in the time it took a crossbowman to reload, aim and fire his weapon. So a three-part system was devised, which was later used with firearms.
Originally, about one third of the infantrymen would use a pike. This is basically a modification of the spear, and was in use long before either crossbows or firearms existed. The pikes of the Renaissance ear were usually 14' to 18' feet in length, and had a spear-head, and axe-head and a hook. The use of the spear point is obvious. The axe was to crush or cut through the armor of the horse or the rider. The hook was used to pull the horseman from his mount. These men would protect the formation from cavalry. One third of the force would use the crossbow to shoot down the enemy, and about one third would use the two-handed broadsword to hack up the enemy when they were unhorsed. The Spanish infantry of the 15th and 16th century used this formation so effectively that they became famous for it, and they called their formation the
tercio. As a result of the Wars of the Reformation in the 16th century, the Spanish infantry became the most feared military organization in Europe. This method is rather obvious, and was devised in Japan in the 16th century as well, during what is known as the warring states period. Oda Nobunaga used the arquebus rather than the bow (crossbows were almost never used in Japan) in a combined formation such as this, and he was able (usually) to shatter the enemy formations in battle.
A Japanese arquebusier of the Sengoku, or Warring States period.
Whether they used the crossbow or the arquebus, the commanders of the day depended on the pikeman to protect the formation from cavalry, and the broadsword was still the principle lethal weapon in use. The crossbow or the arquebus was only intended to empty saddles as the enemy got close. The long, slow and complicated process of loading an arquebus meant that it could not be relied upon to stop cavalry--or, at least, that was the thinking of the day.
In 1564, the Dutch rebelled against their Spanish masters. (I won't go into the long explanation of why Spain then "owned" what we think of as Holland, Belgium, norther France and parts of western Germany.) This was madness by the military thinking of the day, as no one had ever been known to reliably stand against the Spanish
tercios and their heavy cavalry. Even if you could win a few battles, the prevailing wisdom is that you would lose the war. Charles V "lost" the Wars of the Reformation largely because it became to expensive to keep armies in the field, while his German opponents were relying upon the religious fanaticism of their people to keep putting troops in the field.
The Dutch relied upon German and English mercenaries. After their leader, William the Silent, was assassinated in 1584, that man's son Maurice of Nassau, took it upon himself to keep the rebellion alive. The Dutch were routinely defeated in just about every battle, and relied upon their excellent seamen to harass the Spanish supply lines, and when pressed by certain defeat, such as at Leyden, they would break the dikes and flood the enemy out of their camps. This was, of course, hardly a reliable solution to keep a rebellion alive against the richest, most powerful empire in the world. In 1587, Maurice was made Captain General of the Dutch forces, and the Earl of Leicester, who had commanded the forces, left for England (which was just as well, because the Armada was even then being formed to attack England).
Maurice carefully studied all the latest texts on military doctrine and method, and had great natural talent as well. At the siege of the city of Breda in 1590, he deployed his newly created Dutch army, and proceeded to use artillery to reduce the defenses in a systematic way, while keeping his Dutch troops outside the town to face the inevitable Spanish reaction. Maurice then did something unheard of--he put his arquebusiers in regiments alone, without the protection of pikemen, and he put them on high ground near the city. When the Spanish attacked, he had his men arranged in lines ten men deep, which was also against the military practice of the day. At Breda, when the Spanish came to relieve the city, Maurice's Dutch troops stopped the attack of the Spanish heavy cavalry using firearms alone. He used a method known as fire by files. This meant that the first rank fired, and then retired to the back of the formation to reload. The second line, now in the front, then fired and repeated the process. The fire was not accurate, but it was nearly continuous, and when the Spanish cavalry was decimated and ran away, the aura of invincibility of the Spanish army had been destroyed.
Now we need to jump to Sweden. Gustav Vasa had sent many of his officers to study Dutch methods under Maurice (Maurice was 22 when he destroyed the Spanish cavalry in 1590, and he had a long career ahead of him). Among those who learned the new methods was Gustav's grandson, Gustav Adolf--known to history as Gustavus Adolphus (the Latin version of his name). Gustav Adolf was not yet born when Maurice changed the course of military doctrine at Breda, but he studied Maurice's methods, and was trained by Swedish officers who had served with Maurice. There are a host of reasons why the Swedish army was to become the most advanced and effective army in Europe in the 17th century, but that is not to the point here. The French had already developed a lighter weapon than the arquebus, which became known as the musket (from a French word, but word derivation is not to the point here either). One very significant change was the introduction of the flintlock, which was a great advancement over the wheel-lock and the matchlock. The Swedes quickly adopted any new method which was being developed in the late 16th and early 17th century, and one Swedish officer developed new training methods to use the flintlock musket to greatly increase the rate of fire.
Despite Maurice's innovations, most armies in Europe in those days still formed regiments into huge blocks. A standard full-strength Imperial regiment (refers to the Holy Roman Empire) was 1500 men, it was still based on the three-part system with pikemen, swordsmen and arquebusiers, and would be formed on a front of fifty men, thirty men to a file. The prevailing wisdom was that such a formation would be safe from attack in any direction. It was, however, incredibly slow to form, and moved very slowly. It also could not cover a large front, and could not change formation quickly or easily.
Gustavus Adolphus became King of Sweden in 1611. He was still just a teenager, and had a lot to learn. He learned it by fighting the Danes in southern Sweden (the Danish then controlled the southern province of Sweden), where he lost all the battles, but succeeded in winning a settlement, in which the Danes agreed to withdraw their army if the Swedes would agree not to attack. This was in line with the policy of King Christian of Denmark, and famous drunkard and arguably the richest man in Europe in that day. Tensions from the Wars of the Reformation had never really subsided, and had been growing in the early 17th century. In 1618, the Thirty Years War began, mostly because King Christian had a vision of himself as the savior of Protestant Europe.
The fist, Danish phase of the war saw some initial successes by the Danes and the Protestant, but the Holy Roman Emperor had two aces up his sleeve--Tilly and Wallenstein, and particularly Wallenstein. Wallenstein defeated the German commander, Mansfeld, in a series of battles in the period 1625-27, and knocked the Danes out of the war in 1627. There was now no coherent force to oppose the Imperial armies (Catholic armies now ravaging Protestant Germany), but the reputation of the Swedes had risen, and Wallenstein recognized the potential threat of the Swedes. He attempted to aid the Poles who were fighting the Swedes, but failed to bring them to battle. Incredibly, the Emperor fired Wallenstein in 1630, because men jealous of the famous Czech general had convinced the Emperor that Wallenstein was going to try to take the Holy Roman Empire away from him.
Back to Gustavus Adolphus. Gustavus Adolphus initially attacked the Russians, because he believed (wrongly) that the Russians were the allies of Poland. The King of Poland was his uncle, Sigismund, who had converted to Catholicism in order to be elected King of Poland. He would normally have been the King of Sweden, too, but the Lutheran Swedes did not intend to let a Catholic rule them, so the younger brother of Sigismund, Karl, known as Charles IX, became king. When he died, his son Gustav Adolf became King.
With the Baltic coast of Russia and most of Finland in Swedish hands, Gustav turned to Poland, to fight his uncle. Gustav's grandfather and father had fought the Poles from 1600 to 1611, when Gustav came to the throne. Gustav fought the Poles inconclusively from 1620 to 1622, and an armistic was signed. Gustav used the time to equip an army with the new flintlock muskets and small, mobile field artillery, and to train them in the new methods that he and his Dutch-trained officers had devoloped. When the armistice ended in 1625, the Swedes determined to renew the conflict. Gustav then landed in Poland in 1626, and by 1629 had forced Sigismund to sign a treaty renouncing any claim to the Swedish throne. In the same period, the Swedes used the Baltic and their new navy (begun by the grandfather, Gustav Vasa) to supply the Protestant garrisons of Prussian and Pomerania, and particularly the port of Stralsund.
In 1630, Gustav landed at Stralsund, and quickly spread out to snap up all of the Imperial garrisons in Pomerania. The Electors of Brandenburg (his descendants would become the Kings of Prussia) and of Saxony couldn't make up their minds. The hated one another cordially, and were jealous of and feared Gustav. The Emperor panicked, and thought the Swedes would move directly on Vienna, so he withdrew most of his troops, and concentrated his forces in Silesia (setting up many wars to come, once again, a different story). Early in 1631, Gustav tired of the conniving of the Elector of Brandenburg, marched on Berlin, and lined his artillery up to threaten the city of Potsdam (the Elector's capital), after which the Elector decided the Swedes could pass through his territory. The Elector of Saxony went so far as to offer troops and support to the Swedes.
In 1631, the only Imperial troops which were still mobile were under the command of Tilly, and they marched toward Leipsic. Gustav arrived with his army and the Saxons, and at Breitenfeld, he collided with Tilly. The Swedes had taken the Dutch method to even greater extremes. Gustav had very few pikemen, and did not rely upon them. His regiments would be formed in two parts. Half would form a front three men deep, and the other half would form in a dense column behind them. Light artillery pieces would be placed on the flanks between the regiments, and the cavalry would be divided among the regiments to protect the flanks and to support the artillery. This method would not be used effectively again until the Wars of the French Revolution about 150 years later--military men are usually slow to learn, which accounts for the success of innovators such as Maurice and Gustav.
The Imperial cavalry was commend by the Count von Pappenheim. By this time, the Imperialists and the troops of the Catholic League had partially revised their methods, but they still relied upon huge, dense formations of pikemen, supported by small numbers of musketeers. Their cavalry was divided into two large bodies on the flanks. Pappenheim looked at the Swedes, and decided that he could break their line because their cavalry was dispersed. Ignoring Tilly, and violating his orders, he attacked the Swedish right flank. Although he was initially effective, the Swedish muskets had emptied many saddles, and the Swedish artillery had shredded his formations. When the Swedish cavalry quickly united and counterattacked, Pappenheim was not prepared to deal with it. His troops were scattered and disorganized, and the Swedes quickly routed them. The Swedish infantry which had been driven in by the Imperial cavalry quickly reformed (good discipline and superior doctrine) and punished the Imperial cavalry badly as they retreated.
Tilly, was enraged--his regiments had barely begun to move, and here the Swedes were reformed and waiting as though nothing had happened. Their gunfire was almost continuous, because their superior weapons and training allowed them to fire three to four times as fast as the Imperialists. Tilly was good, though, so once his regiments were moving, he sent them one at a time behind the line to move by his right, and then launched an attack on the Saxons, who took one good look and ran. Most of them ran all the way back to Dresden. Tilly was sure he had won now, and sent his cavalry to the far right to capture the Swedish supply train. They probably couldn't have done much good in the coming end game anyway, but it was a fatal mistake. The Swedes, because of their good discipline and their light, shallow and mobile formations, turned to their left to face the Imperialists, and were soon pouring musket fire into the Catholic ranks, which were not even close to coming to grips with the pike. The Swedes would fire by files--the front rank would fire, then the second, then the third. When these ranks were reloading, the second half of the regiments would pour through their formation, and form up one hundred paces further on, and begin to pour more fire into the Imperialist ranks. Tilly's line began to waver, and then broke completely. The Swedish cavalry, not heavily armored and mounted on small, fast horses, poured into the rear of the Imperialist formations, and there was no Imperial cavalry left to oppose them. Tilly and Pappenheim escaped, and most of the army was eventually reformed, but the Swedes were not only masters of the field, there was no coherent Imperial army left in Germany to oppose them.
This was the beginning of the Swedish phase of the Thirty Years War, and it was also the end of heavy cavalry (heavily armored mounted troops), although no one could yet see it. The former method of battle was what was known as parallel formations--both sides would line up facing one another and then have at it. This method would continue long after Gustav's death (he was killed the following year, 1632, at Lutzen, very near the battlefield of Breitenfeld, although the Swedes won that one, too). The lesson of separate operational axes would have to be "re-learned" from the French armies of the Wars of the Revolution and Napoleon, but one important lesson was learned by military men all over Europe. That was that properly handled infantry with firearms could master the battlefield.