Let $f$ be a probability density function (PDF) with domain $D$. How do you think about the codomain (range) of $f$? I'm only able to make sense of this when considering $f$ on an interval; $\int f(x) \newcommand{\dx}{\,\mathrm{d}x}\dx$ makes sense, but $f(x)$ does not. Is this the quirk that defining distributions/generalized functions solves? This is the mental block I've hit trying to make the leap from a discrete random variable to a continuous random variable.
For example, if your random variable is height in inches and $\int_{(a,b)} f(x) \dx$ gives you the proportion of people in your sample with a height in inches between $a$ and $b$, then the units on $f(x)$ must be something like percent per inch, and I can't wrap my head around that.
If the units of $X$ are $u$, then the units of $f(x)$ are $u^{-1}$. This is because the units of $\int f(x)\,dx$ are (units of $f(x))\times$(units of $dx$) on the one hand, and on the other hand $\int f(x)\,dx$ must be unitless, since it is a probability.
The fact that $f(x)$ has units $u^{-1}$ has some mathematical meaning. Suppose $X$ is the random weight of a newborn in kg, with pdf $f_X(x)$, and $X'=1000X$ is the weight of the same newborn in grams, with pdf $g_{X'}(x)$. Note $$g_{X'}(x)=\frac1{1000} f_X\left(\frac{x}{1000}\right).$$ That is, when we change units in a manner that increases the values of $X$ by a factor of $1000$,, the outputs of $f_X(x)$ are decreased by a factor of $1000$, showing $f(x)$ has the opposite units of $X$.