It seemed to be a minor rising power at the time.
Prussia was able to survive simply due to innovative tactics rather than numbers. Of this, there are three major tactics that stand out.
First, Frederick would use what would be the Oblique attack which is best demonstrated in this gif. In this, Frederick would push a majority of his troops on one flank while the rest were in line; by pushing with the steel he would cause the enemies' flank to melt and thus would be able to roll up the enemy line with ease. Since linear warfare doesn't promote good reactionary command (since the line needs to be stiff to survive), many armies would fall to this. However, this would only happen after the majority of the other tactics happened.
Most important to the survival of Prussia is in two major changes in unit creation. The first would be the use of light infantry. While skirmishers fell aside out of organizational challenges (because lines are easy to organize when you're beating soldiers to move together, open order formations were not trusted since soldiers needed to think on their own and might think about fleeing). Frederick trained soldiers to move quickly and fight in open order, thus beginning the use of light infantry/skirmishing in late Early Modern warfare. This light infantry would later be adopted by France and Britain in both the American and French Revolution. Contrary to popular belief, the American colonists did not invent skirmish warfare nor were particularly skilled at it.
Next would be the creation of Horse Artillery. Due to changes in metallurgy and casting techniques, Frederick would be able to cast smaller guns at smaller calibres (six pound guns instead of larger twelve or twenty four pound guns) that would be able to ride forward and throw canister shot (musket balls in a tin canister that would create a shotgun like effect when fired) into the lines at a longer range than the muskets that were used by all nations (rifles were not used en mass by any nation due to the cost, terrible rate of fire, and maintenance cost). By using light infantry and canister to weaken the enemy line for Frederick's aggressive line techniques.
All of this would allow Prussia not to really win but rather survive. By the end of the war, a majority of the Prussian army wasn't Prussian and gave birth to the idea that Voltaire uses in Candide where the protagonist is forced into the Prussian army by getting drunk.
In addition to DonalFDraper's notes, I should add that Frederick got incredibly lucky with the death of Empress Elizabeth of Russia, and the ascent of Peter III. Unlike his mother, Peter III was a prussophile, hated Russia and was an ardent admirer of Frederick. Prior to his ascent, an Austrian-Russian force had actually captured Berlin (not to mention routing the Prussians at Kunserdorf.) On hearing that Elizabeth was likely to die, the Russian general promptly quit the campaign and evacuated the city.
Peter then signed a highly favorable peace with Frederick, which served to anger pretty much the entire population of Russia. Fortunately (for Russia) Peter III's wife was around. But that's another story.
To build on what /u/DonaldFDraper said, not only was Frederick the Great a stellar tactician, his troops were amongst the finest, if not the finest in the world. As well as this, you are right that Prussia was still emerging, but that did mot mean they were not powerful.
Starting with Frederick William "the Great Elector" in the 17th century, Prussia was emerging as a very militaristic state. Frederick William began to build up the small state of Brandenburg-Prussia into a power worthy of note in Europe, and he did so mostly through the building up of the military. Frederick William established the General War Commissariat in Prussia as an entire section of the government devoted to overseeing Prussia's military. The Commissariat's process of building the military included conscription and taxes to fund the troops. This practice of military reformation was continued by Frederick William's son, Frederick the Great's father, Frederick I, sometimes known as the "Soldier King". Frederick I was rather apprehensive of his neighbors such as France and Austria, and even told young Frederick the Great, then known as Frederick II, that Prussia was surrounded by enemies who would love nothing more than to take Prussia for themselves. This belief is reflected by the way he built up his country's military through his reign. He aboloshed the conscription and replaced it by introducing the Canton system, where the country was divided into sections, known as cantons, in which the troops for the Prussian military were drawn. Every male from a canton that was of age was required to serve in some way, shape, or form in the military, and served for life. Through this system, Prussia had the largest army of any country in Europe, taking up about 4% of its population. This massive military strength Frederick the Great inherited when he ascended to the throne after his father's death in 1740 layed the foundation for the talented tactician that was Frederick the Great.
I may update this later, as I don't currently have a book in front of me, but I did get this information from "A Mighty Fortress: A New History of the German People" by Steven Ozment. I would highly recommend this book to anyone studying German history.