Short answer
Before the Kingdom of Prussia was proclaimed in 1701, the region went through several stages: it was home to the Baltic Old Prussians, then the territory of the Teutonic Order, then the Duchy of Prussia under the Hohenzollerns from 1525, and finally part of a joint state with Brandenburg, often called Brandenburg-Prussia.
The Old Prussians
The original Prussians were a Baltic people, related to Lithuanians and Latvians rather than to Germans or Poles, who lived along the southeastern Baltic coast. They had no single state in the way later kingdoms did, and their language, Old Prussian, is now extinct. It faded over the following centuries, and the last speakers are thought to have died out around the 17th or 18th century.
The Teutonic Order
In the 13th century the Teutonic Order, a military and religious order that had taken part in the Crusades, was invited to the region by a Polish duke and began conquering the Old Prussians. Over decades of warfare it set up a monastic state, built castles, such as Marienburg (Malbork), and settled German-speaking colonists. The conquered people were gradually Christianized and absorbed.
The Order later fought repeatedly with Poland and Lithuania. After its major defeat at Grunwald (Tannenberg) in 1410 and a long later war, the Peace of Thorn in 1466 divided its lands. The western part, called Royal Prussia, went to Poland, while the eastern part stayed with the Order as a Polish fief.
The Duchy of Prussia
In 1525 the Order’s Grand Master, Albert of Brandenburg-Ansbach, adopted the Lutheran faith, dissolved the Order’s rule and became the hereditary Duke of Prussia, still under the Polish king’s overlordship. This is generally regarded as the first Prussian state under a Hohenzollern. Königsberg became its capital.
Brandenburg-Prussia
The Hohenzollern family also ruled Brandenburg, an electorate within the Holy Roman Empire, from 1415. When the ducal line in Prussia died out, the Brandenburg branch inherited the duchy, and the two were united in 1618. The ruler was an elector in Brandenburg but still a vassal of Poland in Prussia, until the Great Elector gained full sovereignty over the duchy in the 1650s. That freed the dynasty to seek a royal crown, and in 1701 Frederick III became King in Prussia.
For the events that followed, read the history of the Kingdom of Prussia. The dynasty behind it is described in Hohenzollern history, and for where these lands are now, see where is historic Prussia.