Counterpropagating beams in a ring cavity lasers Ring cavity lasers usually has a intracavity element like a optical diode to forbid standing wave pattern and, consequently, spacial hole burning and related instabilities. So, my question is: why to beams exist (before install the optical diode-like element) inside the cavity, since (as far as I know) stimulated emission radiation "follows" the direction of the pump beam? The beam propagating in the opposite direction is the amplification of the spontaneously emitted radiation amplified by the resonator?

 A: The lasing mode (stimulated emission) may have nothing to do with the direction of the pump laser. For instance, flashlamp pumped lasers are pumped from the side, e.g. a ruby laser. Stimulated emission occurs in the same direction as the stimulating photons -- that refers to another photon in the laser mode, not in the pump. This begs the question of how the lasing gets started. We usually say it's started by 'vacuum', or the quantum fluctuations of the field, which get exponentially amplified once the process gets going.
So, in general, there is no preference between clockwise and counterclockwise modes in a ring cavity, and so the system can be unstable by switching between the modes. In most lasers, people take great pains to make sure the system has a preferred mode. Ring lasers need a way to break the symmetry, which is usually an optical diode (a Faraday isolator). As an interesting note, another way to break the symmetry is to have a non-planar ring oscillator and polarization optics (it's quite a clever solution!). 
A: To have a laser we need three basic things : 


*

*Cavity (defined by some geometry)

*Gain Medium

*Something to pump the gain medium



Laser Operation
We can conceptually describe how a laser works (for more in depth explanations of each component read below) :


*

*There must be a cavity surrounding a gain medium.  The cavity will have a discrete (quantized) set of frequencies which it supports.

*The gain medium must be selected to have a lasing transition with a frequency which matches one of the cavity modes (frequencies).

*There must be a pump which is pumping electrons into energy states above the lasing transition.

*When the pump is turned on, electrons are transitioned to a state above the upper level of the lasing transition, then they quickly decay to the upper state of the lasing transition.  This creates a build up of electrons in the upper state of the lasing transition.  

*Randomly spontaneous emission occurs.  Light emitted from one atom via spontaneous emission can cause stimulated emission in another atom.  This process then can cascade causing a lot of light to be emitted at the frequency of the lasing transition.  Because this cascade was started via spontaneous emission, the propagation directions can be random!

*The cavity, however, only supports modes propagating in the $z$-direction (or cavity propagation direction), light propagating in other directions will decay quickly in any real laser.

*This results in a build of a standing wave in the cavity.  Usually one side of the cavity is then only partially reflective to allow some light to leave, the laser output.


The above answers the OP's question, first the pump is independent of the light involved in the laser transition, it pumps electrons into an energy state higher than the laser transition, so the orientation/direction/pump mechanism have no bearing on the laser light direction.
In fact, the cavity is defining the direction of laser light, initially the atoms are emitting in random directions, and build up of the standing wave only occurs for a cavity mode.

Spatial Hole Burning
Because the cavity has a standing wave, there will be areas where the gain medium is not being used effectively, i.e., in low amplitude areas of the standing wave there will be a lot of atoms with electrons in the upper state of the laser transition and not much stimulated emission occurring.  This is inefficient and causes a host of other problems which you can look up if you want.

Ring Laser
A ring laser cavity is mathematically (well usually) not any different from a normal cavity, it can be unfolded to be a straight through cavity.  In this case, the same analysis that I did below will give a standing wave in the ring cavity.  The reason that you want the ring is so that you can put the optical diode in to block one of the traveling waves, resulting in a traveling wave in one direction only, resulting in the elimination of spatial hole burning.  You could not put an optical diode in a normal cavity because of the path, it would extinguish the light field.

The Cavity
You can think about the cavity as a geometric boundary, and I'll give a semi-classical explanation (i.e., the light is not quantized) here because it is easier to understand and provides good intuition about what is going on.
Mathematically, if you have any wave equation:
$$
\nabla^2{\bf{u}}({\bf{r}},t) + a\frac{\partial^2 {\bf{u}}({\bf{r}},t)}{\partial t^2} = {\bf{u}}({\bf{r}},t)
$$
where $s({\bf{r}},t)$ is the source term, ${\bf{u}}$ is the vector valued function in three spatial dimensions, and ${\bf{r}}=(x,y,z)$, then you can solve it for some boundary condition(s).  
For example, the normal Hermite-Gaussian modes for a cavity made up of two spherical mirrors are solutions to the paraxial wave equation for electromagnetic radiation (see Gaussian Beam Wikipedia). 
For most lasers, the solutions have two components, the solutions to the wave equation in the plane transverse to the direction of propagation, and the number of wavelengths that can "fit" in the cavity.  Both components are dependent on the physical geometry.  
For simplicity, I will discuss a parallel plate resonator below.  
Imagine that we have two perfectly parallel infinite mirrors with a gain medium contained between them.  We will label the the $z$-axis as being coincident with the axis of symmetry of distance between them, and the planes of the mirrors as being parallel to the $xy$-plane.  For this geometry, we don't really have to worry about about the transverse part of the solutions, because of the spatial symmetry. At each transverse coordinate the field (wave) will be constant for a specified $z$ value for all $(x,y)$ coordinates.  The only thing that matters is the distance between the mirrors.  We will also assume that each mirror can be modeled as perfect electrical conductor (PEC).  
Now we have set up a problem which is very similar too the infinite potential well problem in quantum mechanics (QM), except we are using a different wave equation and the boundary conditions are slightly different.  Mathematically the following boundary conditions must hold :
$$
u_x(x,y,0,t) = u_x(x,y,d,t) = 0\\
u_y(x,y,0,t) = u_y(x,y,d,t) = 0
$$
These conditions come from the PEC assumption and Maxwell's equations.  If the mirrors are in air or vacuum (and/or the gain medium is a linear, isotropic, homogeneous medium) then there is no $z$-component of the electric field. To further simplify this answer, lets  assume that $u_y(x,y,z,t)=0$ everywhere.  The general solutions for the wave equation with these boundary conditions are \plane waves :
$$
u_x(x,y,z,t) = a_1e^{i(kz-\omega t)}+a_2e^{i(-kz-\omega t)}
$$
which is the superposition of a forward and backward traveling wave.  Solving for the boundary conditions yields :
$$
u_x(x,y,z,t)=a\sin\left(\frac{n\pi}{d}z\right)\sin(\omega t)
$$
which is a standing wave. Here 
$$
k=\frac{2\pi}{\lambda}=\frac{n\pi}{d}\\
\implies\frac{2c}{\lambda}=\frac{nc}{d}\\
\implies\frac{c}{\lambda}=\frac{nc}{2d}\\
\implies\nu=\frac{nc}{2d} = n\cdot\text{FSR}
$$
where $\nu$ is the frequency, $\lambda$ is the wavelength, and $n\in \mathbb{N}$.  $\text{FSR}=\frac{c}{2d}$ is called the free spectral range.
Intuitively, the cavity can only support the frequencies above because other frequencies will destructively interfere with themselves and die out in the cavity, the frequencies specified above are the ones which will constructively interfere.
The takeaway here is that the cavity, which is dependent on the geometry, only supports standing waves with frequencies of integer multiples of $\text{FSR}$.  The cavity inherently quantizes the supported modes.  These quantized modes are standing waves, which consist of a forward traveling component and a backward traveling component.  Other cavity shapes will give other solutions, but this is a good 1st order approximation for most types of laser cavities.

The Gain Medium and Pump
I won't go into great detail here, there are many in depth books and articles about how gain media work, but I will outline the basics.
Below is a diagram of a greater than 4-level gain medium (courtesy of wikipedia).
The gain medium has to have atomic energy levels that can interact with a light field and the pump source, i.e., atomic energy levels can be transitioned by some kind of pump energy, and one transition which has to absorb and emit electromagnetic radiation.
The gain medium has to have the laser transition frequency be some integer multiple of $\text{FSR}$ for the cavity (in reality it just has to be close) in order for the laser to work.  
The pump then pumps electrons into a higher energy state, a state with more energy than the laser transition.  This pumping to the higher energy state (above the laser transition) does not depend on the laser transition or the stimulated emission of the laser transition!  Usually, there is a very fast decay from the transition that the electrons were pumped to, and the upper level of the laser transition.  This allows electrons in the upper state of the laser transition to build up, and be greater than the number of electrons in the lower state of the laser transition.  This is called a population inversion.  Ideally, we also want the electrons to decay quickly out of the lower state of the laser transition (to some lower state which the pump then pumps back up to a state above the upper laser transition state) to maximize the difference between the electrons in the upper energy state and the lower energy state of the laser transition.

There are three processes we care about with respect to the laser transition itself :


*

*Stimulated emission

*Stimulated absorption

*Spontaneous emission


Stimulated emission is the emission of light (electromagnetic radiation) when an electron drops from the upper state of the laser transition to the lower state of the laser transition.  It occurs when the transition is "perturbed" by incident light of the same frequency as will be emitted when the electron drops from the upper state to the lower state.  This results in more light out than came into the atom.  The emitted light is in the same direction as the incoming light.  Note that this process needs incident light to release more light energy.
Stimulated absorption is the other side of stimulated emission.  This occurs when an electron in the lower state of the laser transition absorbs some light energy and transitions into the upper state.  In this case the light leaving the atom has less energy than the incident light.  It is obvious why we need more electrons in the upper state via the pump, without it the stimulated emission and absorption would cancel each other out!
Spontaneous emission can be modeled as a random process where every once in awhile an electron in the upper state of the laser transition, transitions to the lower state and releases some light without the need for any incident light.  It can be thought of as "stimulated emission for vacuum fluctuations" (this is a quote from one of my professors).  The direction of the light from spontaneous emission is random, and the time at which it occurs is random.
A: In either a linear cavity (such as the Fabry-Perot resonator) or a ring cavity, any continuously circulating light will produce counterpropagating beams and form a standing wave pattern. An optical diode (or Faraday isolator, etc) can be placed in either of these. The only difference (for circulation) is that in the ring cavity, the light can circulate CCW and CW around the ring (from light reflecting off the mirrors), and these are the counterpropagating beams you are looking at.
