If X is an continuos random variable as there are infinitel many elements which belongs to X the $\displaystyle P(X=a)$ cannot be calculated,

But if it is given that $\displaystyle p(X=x) = f(x)$, when $\displaystyle x=a $we can get $\displaystyle P(X=a)$

How come?