If $n = p + q$, then $U(p,q)$ means the group of invertible complex $n \times n$ matrices
which preserve the inner product $(z_1,\ldots,z_n) \cdot (w_1,\ldots,w_n) =
z_1 \bar{w}_1 + \cdots + z_p \bar{w}_p - z_{p+1} \bar{w}_{p+1} - \cdots - z_n \bar{w}_n.$
In the special case where $p = n$ and $q = 0$, we just write $U(n)$ rather than $U(n,0)$.
$SU(p,q)$ or $SU(n)$ denotes the subgroup of matrices of det. $1$.
There is an additional complication that
when people write that $U(1)$ is the maximal compact subgroup of $SU(1,1)$, they don't mean this literally (they couldn't, since $1\times 1$ matrices aren't a subgroup of $2 \times 2$ matrices), but rather that $U(1)$ is isomorphic to the maximal compact subgroup of $SU(1,1)$, in this particular case via the isomorphism that
maps $a$ (a complex number of abs. value $1$, which is what $U(1)$ consists of)
to the matrix $\begin{pmatrix} a & 0 \\ 0 & \bar{a} \end{pmatrix}$.
A further complication is that there are some non-obvious isomorphisms among
these groups, and between some of them and some other matrix groups. E.g. there
is an isomorphism between $SU(1,1)$ and the group $SL(2,\mathbb R)$ of $2\times 2$ matrices with real entries and det. equal to $1$. (This question has some discussion of this isomorphism, and googling (which is how I found this link) will produce many others, I'm sure.)
Finally, there is a rich theory of these sorts of groups (semisimple Lie groups) and their representations, and any discussion of them in the literature might be explicitly or implicitly drawing on that literature. So don't expect to learn everything about them just by knowing the definitions! There is (much!) more to be said about them then you would guess just from their definitions as matrix groups.