Rotation occurs once a year, usually announced around July-June for Pokemon, and occuring around September. It is a way for old cards to be no longer 'legal' (playable) in what is called the Standard format. When a rotation happens, cards from older sets are no longer legal. The Standard format contains only the newest cards, while another format, the Expanded format, has some older cards and the new cards. Currently, the Expanded format contains all cards from the set Black & White and all the other set released after that set as well as promo cards BW01, XY01, and SM01 and up. As of right now, the Standard format contains all cards from the set BREAKthrough and all other sets released after that set as well as promos XY67 and SM01 and up. This means that BREAKthrough, BREAKpoint, Generations, Fates Collide, Steam Siege, Evolutions, Sun & Moon, Guardians Rising, Burning Shadows, Shining Legends, Crimson Invasion, Ultra Prism, Forbidden Light, promos XY67+ and SM01+, and the sets released in the future are part of the Standard format. However, when rotation occurs, some of the sets in the Standard format are removed from Standard format to keep the game fresh. The 2019 season format rotation is valid on and after September 1, 2018 so that the Standard format only includes the set Sun & Moon and the sets released after that as well as promos SM01 and up. This means that Sun & Moon, Guardians Rising, Burning Shadows, Shining Legends, Crimson Invasion, Ultra Prism, Forbidden Light, promos SM01+ and the sets released in the future are part of the Standard format. This makes it so any of the cards you had from the sets that used to be legal in the Standard format are now not legal in Standard (but are still legal in Expanded), with the exception of reprints (I'll get to that later). The Expanded format remains unchanged this year. Standard is the format most people play, and is the best to start with because there are fewer cards, and the gameplay isn't as ultra-fast-paced and the decks are less expensive (sorry for the wall of text).
Reprints are cards that were printed in one set, but were printed again in a later set (possibly with a different look). They have the same text and do the same thing, which is what allows cards from sets that would normally be illegal to still be played if they have been reprinted. Some cards are almost always reprinted so that they will be always be legal. Double Colorless Energy and Ultra Ball are examples of this. This means that any copy of Ultra Ball that you have (even if it is from an old set, like say Dark Explorers) is valid in the Standard format as long as a print of Ultra Ball is in one of the legal sets and they share the same text.
The reason I said you might want to not buy staples from XY sets is because those staples will rotate out on September 1st, so it might seem like a waste of money to you if you don't want to spend a lot.
https://bulbapedia.bulbagarden.net/wiki/List_of_Pok%C3%A9mon_Trading_Card_Game_expansions is a great place to look at all of the existing sets. You can look at each of the cards in the sets and if they have been reprinted.
Does this make sense? Sorry for the loooong explanation, but I wanted to make sure I was thorough (I knew I was confused when I first learned about it) :laugh-squinted: