Very good question. It is also one that gets into some of the esoteric 'black magic' realm of electricity and electronics. The
Wikipedia article on SWR does a pretty good job of explaining it, assuming you understand some of the underlying terminology and principles. The short answer is that it is a measure of impedance matching.
I'll put on my teaching cap and try to explain it. I apologize if I appear to be "talking down" but I would rather tell you something you know than not tell you something that you don't.
Impedance, like resistance, works in opposition to the flow of electricity. Resistance creates heat and the power is loss to it. In addition to resistance there are (linear and passive) components of inductance and capacitance that store energy and release it but it isn't lost but stored in the magnetic and electric field of the device respectively.
A transmission line, unlike like a normal circuit such as a light bulb plugged in to the socket, has a time component to it in that the voltage signal travels down the wire rather than appearing uniformly across the wire at all time. The transmission line is called a 'distributed' circuit and the light bulb would be called a 'lumped' circuit. Whether a circuit behaves as a distributed or lumped one depends upon the electrical length of the connections and wires relative to the physical length. Undoubtedly you've noticed the use of frequency and wavelength almost interchangeably and from your ham radio license study know that the conversion is wave_length = 3.0x10^9 / frequency and vice versa. Likewise you know that the wave length is the distance that the wave would travel in one cycle in a vacuum. (It's not important to this topic, but different types of cable have different propagation velocities that change this electrical length). Needless to say in the RF world, the coax acts like a distributed circuit or a transmission line.
In the distributed circuit realm the trams mission line is modeled as a series connection of capacitors and inductors and the 'characteristic impedance' of the transmission line is the ratio of the capacitance to inductance. It is also the ratio of the voltage to the current, hence it is an impedance. The actual value changes along the transmission line. See this diagram:
https://goo.gl/images/o1NkQf Consequently, in the raw sense, yes, the impedance will vary along the length, in a frequency dependent fashion and as SWR is a measure of reflection due to impedance mismatch, it too will vary along the line. In fact, this principle is sometimes used to tune or match a transmission line.
With the above as the backdrop, here is the explaination from the Wikipedia page as to why the length of the coax is immaterial in terms of SWR in a radio application. In short the transmitter is designed to "look into" the transmission line and see it as a restive circuit. Therefor, we match the LOAD (antenna) to the transmission line so that the source sees the load as if the transmission line weren't there. In other words, the SWR becomes a measure match between the transmitter and the antenna.