The only way of getting Dragon Essence is by killing the Ender Dragon. The amount depends on average difficulty during the fight, and other factors which show how succesful the player was. Because it is possible to respawn the dragon, even if you get low amount of Dragon Essence the first time, you can try again, which makes Dragon Essence a renewable resource.
The Fiery Essence is a renewable and farmable resource as it is dropped by mobs, which spawn in the Burning Mountains biome.
Each Essence has its specific type of Essence Altar, where it can be inserted by right-clicking. Sneaking will transfer 16 essence at a time. It is also possible to insert multiple stacks of the essence as it will automatically refill into selected slot when it runs out.