Where is the distinction made from measurable functions to measurable sets? I was following a particular proof in Measure Theory, one which proves that the function $\{x\in X: f(x) \neq g(x)\}$ is measurable. For completion's sake, here it is.
Let $(X,\mathcal{A})$ be a measurable space and let f and g be measurable functions from X into $[-\infty,+\infty]$. Then the set $\{x\in X: f(x)\neq g(x)\}$ is measurable.
The problem in the proof is in the following line...

$$\{x \in X: f(x) \neq g(x)\}=\{x \in X: f(x)<g(x) \}\cup \{x \in X:g(x)<f(x)\}$$
Since $\{x \in X: f(x)<g(x) \}$ and $\{x \in X:g(x)<f(x)\}$ are both measurable then $\{x \in X: f(x)<g(x)\}$ is measurable.

The first time I went through this I initially had no problem with that statement. Only after did I question the fact that I have no idea what a measurable set IS when it isn't of the form $\{x \in X : h(x)>0 \}$. After all we begin with the definition of measurable functions and later on we can show that: 
A function $f$ is measurable iff $\{x: f(x)>a\}\in \mathcal{A}, \forall a \in \mathbb{R}$ (and similar of the sort)
So I suppose my question is...how to we interpret the measurability of $\{x \in X: f(x) \neq g(x) \}$ when there we can't use the theorems mentioned to link it back to measurable sets of the form we know? Or is there and I'm just not seeing it ?
 A: The assertion that the set $\{ x\in X: f(x) < g(x)\}$ is measurable is not obvious and requires proof. You argue this way:
$$
\begin{align}
\{x\in X:f(x) < g(x)\}
 &= \bigcup_{r\in{\mathbb Q}}\{ x\in X: f(x) < r < g(x)\}\\
 &= \bigcup_{r\in{\mathbb Q}}\left(\{ x\in X: f(x) < r\}\cap\{x\in X: g(x) > r \}\right)
\end{align}
$$
The reasoning is that if one real number is less than another, then you can squeeze a rational in between them (and conversely). The final expression is a countable union of measurable sets, since $f$ and $g$ are measurable functions.
A: When we have a fixed set $X$ with a ($\sigma-$)algebra of sets $\mathcal A$, it is the more or less universal (as far as I can tell) convention that a measurable subset of $X$ is just one that is in $\mathcal A$.
Things can be more ambiguous when there is a measure involved, because that gives you the notion of a set measurable in the sense of Carathéodory, but this is not the case here.
Even more universally, a measurable function is one such that preimages of measurable sets are measurable. Thus if $f\colon X\to {\bf R}$ is measurable (which usually means that it is measurable with respect to the $\sigma$-algebra of Borel subsets of ${\bf R}$), certainly $\{x\in X\mid f(x)<a\}$ is measurable, but it is just an example of a measurable set, not a definition.
