Planet X: A theoretical planet of mysterious origin, or an unknown planet. [Edit: Bad example, the X here refers to Roman numeral 10.]
Or just more interesting example, as it contains the "unknown" element and the Roman numeral for 10.
Xylophone: Possibly the most exciting of all instruments, begins with X. [Author's note: Meant to be humorous, but apparently only to me]
Let's get this one out of the way; a xylophone is a wooden thing that makes sounds; ξύλον (xylon) "wood" + φωνή (phonē) "sound", along with the common change in pronunciation that ξ has when borrowed into English at the start of a word, where we pronounce it /ˈzaɪ/ or /ˈsaɪ/ rather than /ksi/, because we don't pronounce anything as starting with /ksi/. (See Why are there so few English words that begin with the letter X?).
Well, x is commonly used to represent an unknown thing in algebra. More to the point, it is often used to mean a currently-unknown but sought thing in algebra, in those cases where we can "solve for x".
And as a rule, the figurative uses are not just for things that are unknown, but for things that are unknown, that we want to make known.
From this use in algebra, we have figurative use of both "X" and "XYZ" for unknown or undetermined things not sensibly describable through algebra:
The black porker's killed—weighed x stone. —Thackeray, Vanity Fair, 1847
I use it rather as an X Y Z, an unknown quantity. — S. T. Coleridge "Lett. to J. P. Estlin", 1884
And from there we have the X-Factor and X-Rays (Röntgen was quite explicit in his naming after the unknown) and so on.
But why X in algebra?
Descartes used a, b, c,… for known quantities, and x, y, z (giving three quantities and then working backwards from w if necessary) for unknown, because they were far away from each other. He also used p, q, r, s… in yet other contexts, O for a chart origin and n was already in heavy use in mathematics. In all, he was picking his choice of letters so as to give himself space in the alphabet and avoid collisions between different uses.
X doesn't stand for very much (See again Why are there so few English words that begin with the letter X? and note that it applies to many other languages too), so x doesn't become the abbreviation of anything, so x as used by Descartes is "safe", in that it can go a good 350 years without causing confusion with a use of X as an abbreviation.
Reason three (doubtful, often stated but without much supporting evidence):
X can be press-ganged into all sorts of jobs because it's a bit superfluous in most languages' use of the Latin alphabet. In translating الشيء ("thing" and used by the Arabs when they invented algebra for unknown qualities, much as x is now) into Spanish, scribes used x to represent the ﺶ of الشيء, which doesn't have an equivalent sound in Spanish.
Reason four (even more doubtful):
A symbol that looks a bit like x was used as an abbreviation of res (thing) or radix (root) in Latin, much as & and ⁊ were used as an abbreviation of et, % for per 100, vi⁊ or viȜ for videlicet (itself short for videre licet) and so on. It then mutated further to become identical with the letter x much as vi⁊ or viȜ mutated to become viz.
These reasons are not mutually exclusive. We can be sure that the first and second were definitely influences on how we got to the current state. If there is truth to the story behind the third and fourth then they are also reasons, rather than "the real reason".