If an effect instructs a player to pay an object’s mana cost that includes {X}, the value of X is treated as 0 unless the object is a spell on the stack. In that case, the value of X is the value chosen or determined for it as the spell was cast.
October 5, 2018 · Guilds of Ravnica
Normally, all instances of X on an object have the same value at any given time.
April 8, 2016 · Shadows over Innistrad
Normally, all instances of X on an object have the same value at any given time. If an object gains an ability, the value of X within that ability is the value defined by that ability, or 0 if that ability doesn’t define a value of X.
January 23, 2015 · Fate Reforged
All instances of X on an object have the same value at any given time.
February 1, 2010 · Worldwake
Some objects use the letter Y in addition to the letter X. Y follows the same rules as X.