The constraint $f(X,Y)=0$ is not sufficient to ensure a deterministic relationship between the random variables $X$ and $Y$. So, the first thing you need to do is to apply the implicit function theorem to see if there is an implicit function $g: \mathbb{R} \rightarrow \mathbb{R}$ for which:
$$X = g(Y).$$
Assuming there is an implicit function $g$ that determines $X$ from $Y$, the conditional distribution of $X|Y$ is a point mass distribution on its determined value ---i.e., you have:
$$\mathbb{P}(X=g(y)|Y=y) = 1
\quad \quad \quad \text{for all } y \in \mathbb{R}.$$
In terms of finding the value $g(y)$ given a value of $y$, that is essentially a root-finding exercise, for which a number of well-known algorithms exist. In the case where $f$ is differentiable it is usual to use the Newton-Raphson method to find the roots of the function.