In Pathfinder, potions are considered magic items like scrolls or wands and are made in much a similar way. Potions and oils can be made from any spell (or, if you're an Alchemist, formula) up to 3rd level with a casting time of less than one minute that affect one or more creatures.
When you make a potion, you spend material components to do so, which are represented as the gold you pay. You don't just turn the gold into a potion, you use it to purchase ingredients, containers, tools, etc. that you end up consuming when brewing a potion or oil. The value for a potion is equal to the Spell Level x Caster Level x 50 gp. When you brew a potion yourself, you divide the value in half to determine the cost of materials. For example, a Potion of Cure Moderate Wounds would cost 150 gp to make (Level 2 Spell x Minimum Caster Level 3 x 50 / 2). The ingredients themselves may vary between spells, the gold is just used as an abstraction of purchasing ingredients or the effort in finding them yourself.
You must also dedicate time to making a magic item such as a potion. In Pathfinder, potions and scrolls that cost less than 250 gp to make take 2 hours. All other magic items (including potions worth more than 250 gp) take 8 hours for every 1,000 gp of their base price (before you divide it in half for materials) with a minimum of 8 hours. The Potion of Cure Moderate Wounds mentioned earlier would therefore take 8 hours to brew (because its base price is 300 gp, which is more than 250 gp).
To brew the potion, you must work in a place without distractions for up to 8 hours/day. You can work while adventuring for 4 hours/day, but it only counts as 2 hours of work. Otherwise you work in 4 hour blocks that cannot be interrupted in a quiet place with the tools necessary to make the item. You make a skill check (Spellcraft or Craft (alchemy) for potions) versus a DC of 5 + Caster Level of the item. Failing means the materials are wasted and the process must start again. Failing by 5 or more creates a cursed item. You can only work on one magic item at a time.
You must prepare or have the ability to prepare the spell required for the potion (so you cannot brew a potion if you have no available spell slots). You can use any Caster Level between the minimum required for the spell ((2 x Spell Level) - 1, usually) and your Caster Level, though it will change the price of the ingredients required. Brewing a potion consumes the spell slot the spell was prepared in, and any material component costs are added to the cost of ingredients, i.e. a potion that costs 150 gp for magical ingredients and 300 gp for its material components would cost 450 gp to brew.
Brewing potions requires the Brew Potion feat. Once a potion is brewed successfully, it lasts until it's imbided or is dispelled by other means. Potions don't have expiration dates.
In summary, to brew a potion you have to do the following:
- Have the Brew Potion feat
- Pick a spell or formula to make into a potion.
- Pay half the base price in materials. The base price is Spell Level x Caster Level x 50 gp.
- Dedicate 2 hours if the base price is less than 250 gp, or 8 hours for every 1,000 gp (minimum 8 hours).
- Make a Spellcraft or Craft (alchemy) check against a DC of 5 + Caster Level.