There are lots of good answers here and they are all essentially correct, even though they are different! I will try to contribute another, which is somewhat more abstract than the others. I normally wouldn't try this for a high school student, but your very good question deserves different kinds of answers. Maybe this one will help.

It's the "what actually is" in your question that I want to address. In mathematics at a more advanced level you don't think as much about what something "is" as you do about how it "behaves". (The same is true in object oriented programming languages = you say you're studying computer science. If you're learning Java you know about this.)

To manipulate polynomials (which you know how to do) all you really need to know is the sequence of coefficients. We'll assume for the moment that those coefficients are ordinary numbers. It's useful to start those coefficients with the constant term. since the degree (which is the place that holds the last nonzero coefficient) isn't fixed. So the polynomial
$$
8x^3 + 5x + 7
$$
is "really just" the sequence
$$
(7, 5, 0, 8)
$$
or, if you like
$$
(7, 5, 0, 8, 0, 0, \ldots)
$$
where the zeroes go on forever.

What "really just" means there is that if you know the sequences of coefficients for two polynomials you can calculate out the sequence for their sum. Just add the sequences element by element. You can also calculate their product. It's a little harder to write down the algorithm, but you can figure it out if you understand how writing a polynomial the high-school way with powers of $x$ makes the multiplication automatic.

You can even divide one polynomial by another as long as you're willing to allow yourself a remainder (and allow fractions for the coefficients). You may in fact have learned how to do that and called it "synthetic division".

You can also "evaluate" a polynomial at a number $n$ when you know its coefficients.

What all this means in practice is that you don't need "$x$" or its powers to think about polynomials. The "variable" just helps to keep the polynomial arithmetic straight. And that's so useful that we almost always write polynomials with an $x$ rather than as a sequence of coefficients.

Finally, this abstract view lends itself to further abstraction! All you need to know to manipulate polynomials (written as sequences) is how to add and multiply the coefficients. So the coefficients themselves might be polynomials. So, for example, you can think of
$$
4x^2y^3 + 6xy^3 - 2xy^2
$$
as "a polynomial in $x$ whose coefficients are polynomials in $y$":
$$
(0, -2y^2 + 6y^3 , 4y^3) = ((0), (0, 0, -2, 6), (0, 0, 0, 4))
$$
or as "a polynomial in $y$ whose coefficients are polynomials in $x$". (You write that one.)

The coefficients can even be matrices, when you learn what matrices are and how to add and multiply them.

Further thoughts:

You can think of the algorithms for addition and multiplication you learned a long time ago as like the arithmetic of polynomials, only more complicated. When you "collect like powers of $x$" in a polynomial, you just add up what you see. When you "collect like powers of $10$" in ordinary arithmetic you have to simplify further by "carrying", so replacing, say, $21 + 7 \times 10$ by $1 + 9 \times 10$.

If you relax the requirement that the coefficients be $0$ from some point on then you are dealing with a (formal) power series, traditionally written
$$
a_0 + a_1 x + a_2 x^2 + \cdots = \sum_{n=0}^\infty a_n x^n .
$$
You can add these and multiply them with the usual polynomial rules. They are "formal" power series because trying to evaluate them by substituting a value for $x$ is much more subtle than it is for polynomials. You'll study that in calculus. (And formal power series have uses that don't depend on evaluation.)

Then you can decide allow a few terms with negative powers, like
$$
4x^{-3} + 7x^{-1} + \text{ an ordinary formal power series} .
$$
These are called "Laurent series"; they come up when you study functions of a complex variable.
You have lots of nice mathematics to look forward to.