The laser working principle is based on the concept of population inversion and stimulated emission. As I said before, normally very few atoms have electrons in the excited state. Population inversion is all about inverting the population of electrons in ground states, so that maximum electron have atoms in the excited state. This is achieved by bombardment of photons on the atoms, so that many electrons absorb energy and rise to higher excited states. It is known as pumping.
Stimulated emission, unlike spontaneous emission is biasing the probability of electron transition to lower states, causing emission of photons. It is achieved by bombarding of atoms with photons, which have exactly the same energy, as difference between the transition energy levels. To get a monochromatic and coherent light output from a bunch of atoms, many electrons need to be in a specific excited state at the same time and they must make the transition to a lower state, in unison! The light output is monochromatic or single wavelength, as all the atoms emit photons of same energy and it's coherent as the photon emissions occur in unison!
Now that I have given you some idea about the laser working principles, let us have a look at the working of laser and laser pointer. A laser consists of a 'Gain Medium', placed in a resonant cavity, with facility for pumping the gain medium. The gain medium also known as 'lasing medium' is a bunch of atoms, molecules or a mixture of atoms selected according to the wavelength of laser light that is needed. The gain medium is selected after studying spectroscopic emission properties of various atoms. A resonant cavity is an enclosure with reflecting mirror on one side and semi reflecting mirror on the other side. The gain medium is first pumped, that is the atoms are excited by bombardment of photons. These atoms have electrons in excited states which emit photons. These photons keep bouncing around in the gain medium, as they are reflected due to the mirrors. This causes stimulated emission, which increases the number of excited electrons. When these electrons get deexcited, they release photons of the same energy and wavelength. This creates a concentrated, monochromatic output of photons, which escapes out of the semi-silvered mirror, giving a laser output! This light beam can be concentrated by the usage of lenses, giving it directionality, which is a feature of laser light.
According to the lasing medium, the wavelength of laser output changes. There are many types of lasers, differentiated by the gain medium used. Hope this article has given you a rough idea of how does a laser work and provide a monochromatic, coherent and directional light output. To fully understand how lasers work in detail, one must understand some concepts of quantum mechanics and a lot of electronics.