Please correct me if I am wrong but it is my understanding that early monarchs would fund all state expenditures out of their own private money. If they wanted to buy a beer, or build a public road it would come from the same purse. Most of the monarchs funds would come from land that they as individuals owned.
Later monarchs had separate finances from the state. Citizens didn't pay taxes to the king they paid it to the government, just like the king didn't buy ships for the navy, the state did.
How and when did this transition occur? Or am I way off?
The transition wasn't a one-way affair; it went back and forth through times and places. Han van der Horst mentions this as an important difference between Roman and early-medieval Germanic society:
The Germanic kings have never understood an important principle of the Roman Empire: the difference between personal and state property, between an office and a status, between private and public law. They saw their realm and their position as personal property, and treated it accordingly.
(Han van der Horst, Nederland: de vaderlandse geschiedenis van de prehistorie tot nu. Translation mine)
So, the Romans already had this separation, but the Germanic tribes didn't. And then again, later on in the same book, we find the Dutch king William I (r. 1815-1840) financing his own... adventurous investments with public money. He did take measures to cover his tracks, especially from Parliament; the idea that personal and state finances should be separate was clearly there. Still, this example shows that as late as the 19th century, a crafty enough monarch could get away with it.
It really depends on the country. For example, even if unofficial, public and private purses being one in the same is quite the norm for many smaller, poorer, and less institutionally developed countries. Most of Sub-Saharan African nations, as well as many post USSR Central Asian nations, essentially operate on this principle. (I would suggest reading Acemoglu's Why Nations Fail or Wrong's In the Footsteps of Mr. Kurtz to see these principles in action. While cloaked by the titles of modern government, they are much closer to the before mentioned Germanic Kings than anything else.)
It's mostly a matter of layers of separation between the monarch, lands and nobles. Is the monarch/leader more than just a really powerful noble? For most of the medieval period, the answer was no and as such there is no reason to have separation between kingly and public purses. The king only has direct rule over his own lands, and so most tax money raised is the King's own cash to be used for his own troops and improving his own lands. While he may be King of France, the only parts that really directly benefit him are his personal lands. Once the answer starts turning towards yes (standing armies, monarch as direct ruler of the whole country) then when the monarch spends money it is theoretically spent on the whole nation. Now, because he is a direct ruler, if a road is built it benefits him no matter where its built. As a corollary, it also means everyone now has a stake in what's happening everywhere else. If the King wastes too much of the collective nations money, then it impacts other nobles. Meanwhile before the king could waste his personal funds and that might even empower other nobles by weakening him.
The best way to see this difference in action is in how armies worked. Whereas if you are a noble in the early medieval period,your personal forces were your bargaining chip (I have x men, you give me land/titles for them) by the 1600's you were raising forces for a royal army which defends everyone involved as a collective. In the time of Louis XIV or XV, you might leverage these regiments for personal glory and advancement (demanding prime positions in the line of battle) but at the end of the day you are still raising troops for the king. You can't take them home or refuse to send them to fight, especially since you are far more likely to face collective consequences than before. The same applies to money. Your tax dollars are now at work across the country and this benefits you now. This means that the King has to be more careful because he is now dipping into what used to be every noble's own money, just as he had to be more wary when it came to warfare because it was no longer a matter of his own personal warband. In a weird way, the increase of a monarch's power in a country also limited much of their former flexibility.
Turnbull, The Art of Renaissance Warfare and Lynn, The Wars of Louis XIV
To tack on to midnight rambulador, another great example of 19th century monarchs using the public purse is King Leopold and the Congo. He got the Belgian parliament to give him large amounts of loans and then forgive them as a condition of the Congo passing over to Belgium proper. While not purely a matter of the King using the public purse as his own, its a great example of the unofficial sort of practice that keeps the principle alive and well to this day, even if it is less obvious.
Hochschild's King Leopold's Ghost is a great read if you want to see how monarch-parliament relations evolved in the modern world.
My intuition is that this would vary drastically by region. Is there a specific region you're curious about?
EDIT: Holy crap, did I violate some subreddit rule? I was curious about the answer as well but felt like it would help focus the responses to have more detail in the question. Aside from the fact that this is my most downvoted comment ever by far, I like this subreddit and its culture and it would be nice if 1 (or more) of the downvoters was mature enough to tell me what I did that was so egregious so I can avoid doing it in the future.