In math mode, every element of text is assumed to be a variable, and typeset as such : in particular, for this matter, variables shouldn't form "words", that's why the texing engine won't display spaces. However, it is possible to print text "as if non in math mode", but you have to tell latex that it should regard that content as text.
Amongst the various commands you may use :
\mathrm, \mathbf, etc (for mathematical text, such as function names : this won't give correct spacing as well!)
\text from the amsmath package (for casual text, will use the font of the outer environment)
\textrm, \textbf, etc. (in case you need specific font formatting -- the difference with the math equivalent is that you can use accented characters or inline maths inside these)
In your example, this works, for example :
\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{geometry}
\geometry{a4paper}
\usepackage{amsmath}
\begin{document}
Number $2-a$:
\begin{align*}
Z &\longleftarrow \Phi(x,x) \\
Y &\longleftarrow Y +1
\end{align*}
Number $2-b$:
\begin{align*}
\mathbf{IF } x &\in A \mathbf{ GOTO } E\\
Z &\longleftarrow \Phi(x,x) \\
Y &\longleftarrow Y +1
\end{align*}
\end{document}
Note that as I said above, spaces are basically ignored in math display. So if you want your spaces to be taken into account, and your text to be separated from the rest of the sentence, you need to make sure the spaces are with the text, inside the braces.