There are two kinds of spells that every character is able to learn. Some talents are available in the Talent Tree, while others are located in the Talent Grids. To see your talents, open the Talents panel (default key N).
Spells are talents that need to be activated every time you want to use them. Passive abilities are talents that are always active.
This tab contains talents that are available from the beginning of the game. Every time you level you automatically receive one talent point that you can invest into these spells.
Every spell here can have three ranks, each more powerful than the previous ones. The first rank costs one talent point, the second rank costs two points, and the third rank costs three points. This means that you need to level-up six times to get the third rank of most spells, so only invest more than one talent point in spells that are the most important for you.
There are six tiers of spells. To learn spells from a higher tier, you need to invest a certain amount of talent points in any combination of talents from lower tiers.
When you reach level 10, three Talent Grid tabs become available to you. Each of them contains new spells and useful abilities that can benefit you. To learn these talents, you need to purchase Rubies from your class trainer. You can buy one Ruby every time you level.
To unlock a talent, you need to connect it with the middle square of the grid. You can only connect them by selecting squares horizontally or vertically, spending 1 ruby at each square, which means that you might have to waste some rubies to get certain talents. Each talent square can be chosen once, but there are a few duplicate squares that can be stacked with each other.
You can see an example of a Talent Grid on the right. To get the highlighted talent, a mage will have to spend 3 Rubies to connect it to the middle square, and one Ruby to unlock the talent.
Resetting talent or stat points (respeccing) in this game is not an easy thing to accomplish, so do some research before allocating them. To reset talents, you need to acquire Water of Death. To reset stats, you need Water of Life. Bring any of them to your class trainer, and you'll be able to re-allocate the spent points.
Up until level 15, you can approach your Class Master and request a reset for free.