Is my textbook wrong? My textbook says (without explaining how it is done): 
$$\begin{pmatrix} 
  1\ 2\ 3\ 4\\ 
  2\ 1\ 4\ 3 
\end{pmatrix}\begin{pmatrix} 
  1\ 2\ 3\ 4\\ 
  2\ 3\ 4\ 1 
\end{pmatrix}=\begin{pmatrix} 
  1\ 2\ 3\ 4\\ 
  3\ 2\ 1\ 4 
\end{pmatrix},$$
and as I understand this is obtained by doing calculations from left to right, but as I read here and elsewhere it should be done from right to left, like function composition...
So what i got is: 
 $\begin{pmatrix} 
  1\ 2\ 3\ 4\\ 
  2\ 1\ 4\ 3 
\end{pmatrix}\begin{pmatrix} 
  1\ 2\ 3\ 4\\ 
  2\ 3\ 4\ 1 
\end{pmatrix}=\begin{pmatrix} 
  1\ 2\ 3\ 4\\ 
  1\ 4\ 3\ 2 
\end{pmatrix}$,
or in cycle notation:
$(1,2)(3,4)(1,2,3,4)=(2,4)$ am I right?
 A: Both conventions are used, both in cycle notation and in two-line notation, so you have to know which one a particular writer is using; neither is right or wrong per se. Your textbook is evidently using the left-to-right convention, and its answer is correct for that convention. Your answer is correct for the right-to-left convention, but when reading that book you should remember that it uses the left-to-right convention. 
A: Most people nowadays write $\,f(x)\,$ for "the value of the function $\,f\, $ at $\,x\,$ ", but some people, in particular algebraists, used to write instead $\,(x)f\,$ with the same meaning (and some $\,7-8\,$ decades ago almost all algebraists used this notation). 
If you use the former notation, then you must multiply permutations from right to left, and if you use the latter one then you do it from left to right, as in the example you show.
In general the difference is not dramatic, but there's one instance where it can be pretty confusing: with linear transformations and their corresponding matrix representations wrt some basis. I won't extend on this here as I don't know if it is relevant for you.
A: As Brian M. Scott has noted, it is a matter of convention.
Although possibly not natural at first, left-to-right has some advantages, especially when doing products of permutations in disjoint cycles form, if your mother language is left-to-right, because you compose as you read.
Notice that you write your cycles left-to-right
$$
\begin{pmatrix} 
  1\ 2\ 3\ 4\\ 
  2\ 3\ 4\ 1 
\end{pmatrix} = (1234),
$$
so if you try and do
$$
(12)(34) \circ (1234)
$$
first right-to-left and then left-to-right, you will notice the (admittedly very slight) difference in the work you do. Mind you, I don't want to convince you to shift allegiances, whatever works for you is fine, of course.
Must add that I am a group theorist at heart, and apparently the left-to-right virus is particularly virulent in my community.
Concerning the answer by Don Antonio, I decided long ago that my vectors were row vectors, so when I compose I have to put my matrices on the right.
A: Permutations are functions, so most people do the evaluation from right to left.
