If a charge is distributed evenly throughout a region of space, then we can calculate the volume charge density $\rho$ by dividing the total charge $q$ by the volume $V$, obtaining $\rho=q/V$, with dimensions $Q/L^3$. If the charge is distributed unevenly, then we need to find out how the charge density depends on position, either through careful measurement or through theoretical arguments. In this case, we often write $\rho=\rho(\rr)$ as a reminder that $\rho$ is not constant. We can imagine this process as finding the charge in a tiny region of space, small enough that the charge can be considered to be evenly spread throughout that region, and dividing the charge by the volume of that tiny region. Thus, the volume charge density will still have dimensions of $Q/L^3$, even when it is not a constant.
Consider now a charge density that is only non-zero in a very thin region around a two-dimensional surface. If this region is sufficiently thin, we can idealize the charge as being infinitesimally thin; we call the resulting charge distribution a surface charge density, usually denoted $\sigma$. We can find the surface charge density by dividing the total charge on a (possibly infinitesimal) piece of the surface by the area $A$, obtaining $\sigma=q/A$. Regardless of whether the surface density is constant, it will have dimensions $Q/L^2$. Similarly, a linear charge density is the idealization of a charge density that is only non-zero in a very thin region surrounding a one-dimensional path. A linear charge density, usually denoted $\lambda$ has dimensions $Q/L$. As with volume charge densities, we often write $\sigma=\sigma(\rr)$ and $\lambda=\lambda(\rr)$ for surface and linear charge densities, respectively, which are not constant.