A vector $\mathbf{v} = v^i \, \mathbf{e}_i = q^j \,\mathbf{u}_j$ has different vector components ($v^i$, $q^j$ in this case) in different bases ($\{\mathbf{e}\}$,$\{\mathbf{u}\}$, in our example) which we can interpret as different reference frames (different axes with different origins).
Physicists are lazy: they refer to the vector components $v^i$ as vectors, which is a misnomer! A true vector $\mathbf{v}$ exists out width whichever basis you choose to work in but to know its entries you must reference these with respect to a given basis: this is just elementary linear algebra.
Now, the magnitude of a vector is independent of whichever bases you choose for its description (that is, geometrically speaking its length is fixed):
$$
v^2 = v^i \; v_i \, (\mathbf{e}^i \cdot \mathbf{e}_i) = q^{j} \, q_j\,(\mathbf{u}_j\cdot \mathbf{u}^j)
.
\tag{assuming orthonormal bases}
$$
Hence, scalars do not transform upon of change of basis. In fact it doesn't make much sense to talk about basis for scalars since intuitively these are just numbers.
However, one other way to look at this is to consider a scalar a special type of vector with only one entry and one orthonormal basis (the number 1): its "length" must also be fixed. Hence, this one-dimensional "vector" is the same independent of reference frame.
This is true for all vectors, including special relativistic four-vectors.
As a sanity check, one of the tenets of special relativity is that $c$, the speed of light and a scalar, is the same for all observers. This could not be so if it was somehow different in different frames.