Question: Could someone please explain this [experiment](https://en.wikipedia.org/wiki/Stern%E2%80%93Gerlach_experiment#Sequential_experiments) to me? Why depending on the orientation of the apparatuses, we get different results? For example why if we have $z,x,z$ (I am not sure what is the correct notation for this but I hope it is clear what I mean by this) orientation, we get 50-50 possibility to observe the particle in $+z$ and $-z$, while it would change to 100-0 if we remove the apparatus that is parallel to the $x-$axis. I hope this question is clear enough to be answered if not please let me know to clarify it.

Answer: 
I will add an informal answer to the already existing one. The z-component of the spin of an electron and the x-component of the spin of an electron are non-commuting observable (i.e. $\hat{S\_z}\hat{S\_x} \neq \hat{S\_x}\hat{S\_z}$) in quantum mechanics. This implies that you cannot both know the x-component of the spin and the z-component of the spin of a particle at the same time. The punchline is that the very act of measuring your particle changes its state. Hence even if you knew that the particle was spin-up in the z-direction initially, if you measure the spin component in the x-direction afterwards, then you don't know anymore what the spin in the z-direction is. The act of measuring the x-component of the spin changed the state of your electron.
The question you have asked directly appeals to the axioms of Modern Quantum Mechanics. In the past, following the experiments like Stern-Gerlach experiment, people like Heisenberg, Dirac and many others wrote the formalism of Quantum Mechanics in terms of Linear Algebra which is understood with some physical axioms would explain us why does the experiment gives the seen result. 

Firstly, we want to state that 

1) The state of a quantum system is represented by a "vector" represented by $|\psi\rangle$ in a Hilbert space(which is a technical name for a linear vector space which has inner product defined on it with some additional convergence conditions).

2) The output of any observation results the state vector $|\psi\rangle$ of the system to change to an eigenstate of the operator which is associated with the observable and the value of the measurement is the eigenvalue. 

With these two guiding principles, we can work out the results of the experiment. So lets assume that before the first splitting of the beam in $z+$ and $z-$ the state of the system was $|\psi\rangle$. Now because we want to measure the spin component of the atoms along the $z$- axis, the result of the observation would change the state of the system to $|z,+\rangle$ and $|z,-\rangle$ with eigenvalues $\pm\frac{\hbar}{2}$. Also, to calculate the relative probabilities of the observations of an experiment, we can express our state vector in the eigenbasis of the operator which we are measuring and the $|.|^2$ of the coefficients would tell us the relative probabilities of the experiment. So
$$|\psi\rangle=\frac{\hbar}{2}|z,+\rangle-\frac{\hbar}{2}|z,-\rangle$$
and after the first SG apparatus, the two beams have atoms in the state $|z,+\rangle$ and $|z,-\rangle$. Now if one takes any of the split beams lets say $|z,+\rangle$, and measure again the $z$ component, the task would be express the state ket now, i.e. $|z,+\rangle$ in the eigenbasis of the $\hat{S\_z}$ operator which would be 
$$|z,+\rangle=|z,+\rangle+0\times|z,-\rangle$$

and hence a repeated measurement of $\hat{S\_z}$ would result into the same state ket giving 100-0 case. But if we want to measure the $\hat{S\_x}$ case, the ket $|z,+\rangle$ would be written as 
$$|z,+\rangle=\frac{\hbar}{2}|x,+\rangle-\frac{\hbar}{2}|x,-\rangle$$

since $|x,\pm\rangle$ are orthogonal to $|z,\pm\rangle$. So, then after the measurement of the $x$ component, the split beam would have atoms with $|x,+\rangle$ and $|x,-\rangle$ as state kets and a repeated measurement of $\hat{S\_z}$ on any one of them say $|x,+\rangle$ would result into a 50-50 outcome of $+$ and $-$ component as 
$$|x,+\rangle=\frac{\hbar}{2}|z,+\rangle-\frac{\hbar}{2}|z,-\rangle$$

Hence the 50-50 outcome. For a more detailed analysis, read chapter 1 of Modern Quantum Mechanics by JJ Sakurai.