Given a probability space $(\Omega, \mathcal{A}, \mathbb{P})$. Let $Y$ be a random variable taking the values 0 or 1. Let $X$ be some absolutely continuous random variable taking values in say $[0,1]$.
Let us consider the following probability: $ \mathbb{P}(Y=1 |X=x)$.
1.) Is this even well defined? Since $X$ is an absolutely continuous RV, the probability for any $X=x$ is zero, so what does it mean to condition on an event of zero probability?
If we were to use Bayes theorem, we would have to deal with an expression involving $\mathbb{P}(X=x|Y=1) $.
2.) Again this shouldnt be defined since $X$ is an absolutely continuous RV. So am I not allowed to use Bayes theorem here?
First of all, let's revisit the discrete case. The Bayes theorem in particular says that $$ \Bbb P(Y \in B, X\in A) = \sum_{k\in A} \Bbb P(Y \in B|X = k)\Bbb P(X = k) = \int_A \Bbb P_{Y|X}(B|k)\Bbb P_X(\mathrm dk) \tag{1} $$ where the last formula is just a rewriting of the first formula where we have just put as definition $$ \Bbb P_{Y|X}(B| x) := \Bbb P(Y \in B|X = x) $$ and $\Bbb P_X$ is the distribution of $X$: a probability measure induced by $X$ on its range. Note that $\Bbb P$ is a measure on $\Omega$ whereas $\Bbb P_X$ is a measure on $\Bbb N$ since in the discrete case $X:\Omega\to \Bbb N$. These two measures are related by $\Bbb P_X(x) := \Bbb P(X = x)$ or more generally $\Bbb P_X(A) = \Bbb P(X \in A)$ for any measurable $A \subset \Bbb N$.
If something up until now is not clear, try re-reading it, we don't do anything here, just renaming things and recalling the definitions that are sometimes not understood thoroughly when met the first time.
Now, the trick is that $(1)$ is not just the property of conditional distribution in the discrete case. It is their defining property, meaning that we can use that as a definition. Any function $\mu(B|k)$ that solves $$ \Bbb P(Y\in B,X\in A) = \int_A\mu(B|k)\Bbb P_X(k) \tag{2} $$ is a (version of) conditional distribution $\Bbb P_{Y|X}$. Note that this function is only uniquely defined for $k$ where $\Bbb P_X(k) > 0$. Indeed, if $\Bbb P_X(k) = 0$ for some $k$, then no matter how we change $\mu(B|k)$ it will not affect the validity of $(2)$. That's why we say that $(2)$ defines $\Bbb P_{Y|X}$ uniquely only $\Bbb P_X$-a.s.
If $Y$ is discrete as well, by taking $B = \{j\}$, single element sets, we can also define a conditional probability mass function $P_{Y|X}(j, k) := \Bbb P_{Y|X}(\{j\}, k)$. Obviosly immediately from definition it has the property that $$ P_{Y|X}(j, k) = \Bbb P(Y = j|X = k). $$
Finally, for the contiunous case we can take $(2)$ as the definition of the conditional probability. Namely, a function $\mu$ is a conditional probability of $Y$ given $X$ if and only if it satisfies $$ \Bbb P(Y \in B,X \in A) = \int_A \mu(B|x)\Bbb P_X(\mathrm dx) $$ or equivalently if $P_X$ has density $p_X$ (w.r.t. the Lebesgue measure): $$ \Bbb P(Y \in B,X \in A) = \int_A \mu(B|x)p_X(x)\mathrm dx. $$ Now, if it so happens that $\mu(B|x)$ also has density $m(y,x)$ (w.r.t. the Lebesgue measure) for each $x$ then the last formula becomes $$ \Bbb P(Y \in B,X \in A) = \int_B\int_A m(y,x)p_X(x)\mathrm dx\mathrm dy \tag{3} $$ and we call any $m$ that solves $(3)$ for each measurable $A$ and $B$ a (version of) conditional density of $Y$ given $X$.
Note that if we have some $m$ that solve $(3)$, we can change it at any single point, it will still solve $(3)$. We can even change it at a infinitely (but countably) many points and it will still solve $(3)$. We can even find an uncountable set which has $0$ measure w.r.t. the Lebesgue measure on $\Bbb R^2$ and change $m$ there the way we like, and it will still solve $(3)$. For example, such set can be a circle, a straight line etc. That's why for no $x,y$ the value of $m(y,x)$ is fixed, only the overall shape of it matters since it is defined through the integral equation $(3)$. For this reason, for continuous random variables expressions $\Bbb P(Y = y|X = x)$ are undefined, meaning that this value can be anything and it will not affect anything. In contrast, values of the kind $\Bbb P(Y \in B|X \in A)$ for any $A$ such that $\Bbb P_X(A) > 0$ are strictly fixed.