Different ways to orient the spin in the same direction I know that all electrons have quantised spin. But how can one orient all the spins of a given bunch of an electrons in the same direction?
I know one way is that we pass the electrons through a uniform magnetic field (which is I guess from where the 'magnetic quantum number' name of the spin comes from). But why does this method does so? And is there any other way one can achieve this?
 A: A (uniform) magnetic field by itself does not orient spins in the same direction. What really happens is that in the magnetic field the spins of different orientations have different energy:
$$E_\pm = \pm \frac{\hbar\omega_g}{2}
$$
The spins undergo equilibration towards thermodynamic equilibrium - e.g., via amitting photons of frequency $\omega_g$, accompanied by a spin-flip. So we end up with spins having probability to be in a certain state:
$$
P_\pm = e^{\mp \frac{\hbar\omega_g}{2k_B T}}
$$
Thus one ends up in most of the spins oriented in one direction.
Another widespread method to polarize spins is by using a strongly inhomogeneous magnetic field, where differently polarized spins are pulled in different directions. Details of thsi method are usually described in connection to the Stern-Gerlach experiment (the simples treatment is presented in the Feynmann lectures), but this method is also important for creating population inversion in the ammonia maser (the first quantum generator) and Hydrogen masers (the current frequency standard).
A: Spin (a purely quantum phenomena) was discovered to explain very fine splitting in Emission spectrum which was very much similar to the splitting that happened in presence of a weak magnetic field.
Yes you are right. So spin accounts for a very small magnetic moment in particles (including electrons), the magnitude depends on the particulars about the particle and so interacts with magnetic field.
Hence to orient spin in free particles, we simply place them in a uniform magnetic field and the magnetic moment will align along the direction of the magnetic field just like a bar magnet would do.
Magnetic Quantum Number has very little to do with spin as such, its a set of numbers that assign certain magnetic properties to orbital that come out as solutions to the so called Schrodinger Equation.
A: Spin was introduced to explain the hyperfine splitting in the emission spectrum of atoms under the influence of a magnetic field. This was done because the deflection of charged particles under the influence of a magnetic field (Lorentz force) and because the gyroscope effect (with its deflection transverse to the rotation and the applied force) were known phenomena. Since electrons were considered exclusively as electric charges, a rapid rotation of the electrons (considered to be point-like) was explained as the cause of an electric current leading to a magnetic field.

But how can one orient all the spins of a given bunch of an electrons in the same direction?

For free electrons simply the external magnetic field align the electrons magnetic dipoles all in the same direction. For bounded in atoms electrons the possible alignment depends from the strength of the bounding between all the electrons and the nucleus.
