The precise statements that you need are:
Proposition: If $F$ is a smooth vector field defined on an open set $U$ in $\mathbb{R}^3$ then its curl is zero.
Proposition: The converse to the above holds if $U$ is simply connected: any smooth vector field defined on a simply connected open set in $\mathbb{R}^3$ whose curl is zero is conservative.
The first statement simply follows from the identity $curl(\nabla f) = 0$, which in turn follows from equality of mixed partial derivatives.
The second statement is quite a bit deeper. The simply-connectedness assumption is crucial; it is useful to keep the following counter-example in mind:
$$F(x,y,z) = \left( \frac{y}{x^2 + y^2}, \frac{-x}{x^2 + y^2}, 0 \right)$$
This vector field is smooth on the complement of the $z$-axis in $\mathbb{R}^3$, an open set which is not simply connected. You can check that its curl is zero, but it is not conservative.
The easiest way to see why is to consider the line integral of $F$ along the oriented unit circle in the $xy$-plane. If $F$ were conservative, meaning $F = \nabla f$ for some smooth function $f$, then this integral would be zero: this is because for any smooth oriented curve $C$ starting at a point $p$ and ending at a point $q$ we have $\int_C \nabla f\, ds = f(q) - f(p)$, so we get zero if $C$ is a closed curve such as the unit circle. On the other hand, you can check by direct calculation (with a choice of parameterization) that the integral of $F$ around the unit circle is $2\pi$.