A Mastery is an area that a summoner is able to focus their intense magical training into, categorized into three specific categories, which are collectively known as masteries. Some of the more advanced masteries require not only a working knowledge of previous masteries within a single category, but also the knowledge of a specific mastery. As a summoner gains levels of power within the League of Legends, they are able to select which specific areas of interest to focus on.
Summoner masteries are not set in stone; based on the type of champion you wish to control in a battle arena, masteries can be changed to better suit a summoner's needs, simply by pressing the "Return Points" button to completely reset your masteries and allow yourself to choose others in which to spend your points, you can only spend your masteries up to 30 ("re-spec").
There are three types of trees that your summoner can develop in:
Mastery pages were released in patch V184.108.40.206b. Mastery pages can be stored and, later, chosen similar to Rune pages during champion selection. You can have up to 20 Mastery Pages.
With each level achieved by a Summoner, the Summoner also receives one mastery point, capped at 30 mastery points, the maximum summoner level. Each mastery takes one point to increase its level and each tree contains at least 37 points worth of masteries, so even at top level the Summoner is not able to completely fill any one tree, let alone all trees. This adds a strategic element to your selection of Summoner masteries, as you can choose masteries that synergize with your champion, spells, and teammates.
It is important to note that most masteries require points in the tree. When moving to higher levels in the tree (higher "tiers"), one will encounter an increasing prerequisite of a 4 points spent in that tree. For example, in order to put points into Alacrity (a tier-2 offense mastery), one must first put a total of 4 points into any of the tier-1 offense masteries, and to put a point into Juggernaut (the tier-6 defense skill), one must have 20 points in other defense masteries. A summoner must have at least 21 points (so level 21) to acquire the last mastery in a tree. The last mastery is usually the most useful and vital to that particular mastery tree.
Some masteries require another mastery to be earned before a higher tier mastery is available. This more direct type of prerequisite is shown by the grey lines that sometimes lead from one mastery to another higher-tiered mastery. These connected masteries usually correlate in some way. The lines denote the fact that all ranks of the lower tier mastery must fully acquired ("maxed out") before the higher tier mastery will become available.