Potions can be created by brewing. But before you can brew a potion, you must have learned the particular potion's recipe by right clicking on the recipe. After that, you must make sure that you have enough resources. Open the brewing dialog by right clicking on a brewing cauldron, located in the brewery in the basement floor of Nicholas' shop in Ellaria. Inside the brewing dialog you can find a sub-dialog with a list of the recipes you have learned, each with their own list of ingredients needed.
To start brewing, enter the desired amount of potions and select the desired potion size (ampoule, vial, shot, jar or flask). Note that different sizes require different amounts of resources, and that you must of course multiply the resource amount by the number of potions you are brewing. Once brewing begins, drop the ingredients (1-100 at a time) into the brewing dialog until you have a perfect match of resources in the mixture. Do not drop in ingredients while the mixture is boiling or it will explode - instead, wait until the boiling ends. The boiling time will be shorter and shorter the more you advance your brewing skill. The brewing skill is capped to a maximum of 100.