In its most basic form, glass is just melted silicon dioxide (SiO₂) sand, also known as a silica or quartz. You need, 1700 °C to melt silicon dioxide, which is quite a lot. A campfire cannot reach that temperature, but you could do it in a kiln (ancient brick oven). You can get glass made from pure silicon dioxide today, but it is expensive due to the high temperatures required to make it.
Humans learned over time that by adding in sodium carbonate (Na₂CO₃) or potassium carbonate (K₂CO₃) and calcium oxide (CaO) they could make the mixture melt at 580 °C and get more durable glass. It is the sodium (Na) which when heated reacts with silicon dioxide to create shorter chained silicon dioxide crystals.
In general, longer bonds require higher temperature to melt. You can see the same when looking at hydrocarbons. Hydrocarbons are chains of carbon atoms with hydrogen attached. Very short hydrocarbons are gasses, longer ones are liquids (oils) while the longest ones are solid. A solid hydrocarbon is what we call a polymer or a plastic.
Romans made what we call soda-lime glass consisting of 70 percent silicon dioxide, 15 percent sodium carbonate and 9 percent calcium oxide. The name soda-lime comes from the fact that Na₂CO₃ is commonly called soda and CaO is called lime. Romans got a lot of their sodium carbonate from natron, a naturally occurring sodium carbonate decahydrate. Natron was harvested directly as a salt mixture from dry lake beds in Ancient Egypt.
With the fall of the Roman Empire, Northern Europeans began experimenting with substitutes for sodium carbonate. They discovered that potassium carbonate (K₂CO₃), known as potash, could be used instead of sodium carbonate.
Potash is obtained from wood ashes. Because potassium carbonate is a salt soluble in water, you can extract it by mixing wood ash with water. The potassium carbonate will dissolve in water, while the sooth will settle at the bottom. The water containing potassium carbonate can be scoped up and boiled to retrieve the white potassium carbonate salt.
Given all the forest in Northern Europe, this was a natural way of making glass there. Due to the use of potash from wood ashes, the glass made using potassium carbonate was historically called forest glass.
Glass was not something discovered, but something that evolved. At first, only glass beads could be made. Later moulds were used to create glass vessels, but these were thick and heavy. Glassblowing did not get discovered until 1st century BC by Syrian craftsmen. It made it possible to make much thinner and lighter glass in more complex shapes.
The first glass made was not transparent, but colored. Colorless glass evolved in Ancient Greece in the Hellenistic period (323 BC to 146 BC). Adding metallic elements gave the ability to create colorful glass called stained-glass. Stained-glass become popular in churches and palaces. The Byzantines were the first to use stained-glass in their churches.
Making flat sheets of glass was actually quite difficult, which is why only the rich had glass windows at first. Windows from historical times are segmented into smaller squares because making larger glass squares was difficult and expensive.