Let $X$ be a set and $\sim$ an equivalence relation on $X$. I know how to define the quotient set
$$ X/{\sim} := \{ [x] \in \mathcal{P}(X) \mid x \in X \}, $$
but I'm a bit confused about how exactly to define a function on the quotient set. I have seen it done by writing something like
$$ \begin{align}\phi\colon X/{\sim} &\to Y, \\ [x] &\mapsto \phi([x]), \end{align}$$
for some set $Y$, where the definition of $\phi$ makes use of the representative $x$ explicitly in some way, say $\phi([x]) := \psi(x)$ for some $\psi\colon X \to Y$. So assume that we have shown that the function is well-defined.
What exactly do we mean when we write $[x]$ in the definition above? We need to use the representative to find the image of the equivalence class under $\phi$, but how do we choose the representative? Do we need to appeal to the axiom of choice?
Also, I thought there might at least be cases in which we didn't need choice, e.g. if $X$ is well-ordered. We would then construct a set of representatives (without choice), map each equivalence class to its chosen representative and use that to define $\phi$. But the function is not defined in terms of the representatives, but in terms of the equivalence classes themselves, so we presumably still need to show that the image of some equivalence class under $\phi$ is independent of the choice of representative. After all, our choice of representative is not part of the function. And it seems like that still requires choosing a generic element, but I'm very unsure whether that requires choice or not.
In general, I think I'm very confused about when we are making a choice that requires the axiom