A spectral line is associated with a pair of levels of an atom with energies $E_1\lt E_2$. Typically, unless we deal with fancy lasers etc., the number of atoms at the level $E_2$ is smaller than the number at the level $E_1$ – because Nature struggles to save energy. The ratio is given by $\exp(-\Delta E/kT)$, by the universal laws of statistical physics.
So a general system displaying absorption or emission is described at least by one parameter, the occupation number ratio for the higher level and the lower level. There is one more important parameter – the density of photons $N$ in the appropriate state with the relevant frequency. If there are no photons to start with, there can't be any absorption. There is nothing to absorb.
The general rules based on the quantum harmonic oscillators imply that the probability of absorption if there are $N$ photons is proportional to $N$ while the probability of emission if there are $N$ photons to start with is $N+1$. These two statements are related by the time-reversal symmetry; there is $N+1$ instead of $N$ because it's the number of photons in the final state which is the time-reversal partner of the initial state from the case of the absorption.
Also, $N+1$ may be interpreted as the sum of $N$, the stimulated emission, and $1$, the spontaneous emission. These rules were already known to Einstein almost a decade before the birth of quantum mechanics.
So if the initial system has lots of photons in the right frequencies and a relatively small number of excited atoms, the absorption – accompanied with the excitation of many unexcited atoms – will dominate. On the contrary, if you place many atoms (with a high enough proportion of the excited ones) to an environment without light, the emission will exceed absorption. These ratio of the emission and absorption rate is easy to calculate.
In all cases, you may view the excess of absorption or excess of emission to be examples of the second law of thermodynamics – heat is flowing from a warmer body to a cooler one. The two objects are the set of atoms and the electromagnetic field (its relevant modes). If the temperature of the atoms (given by the ratio of the occupation numbers for excited and unexcited states) is higher than that of the electromagnetic field (given by the number of the photons), heat will flow from atoms to the electromagnetic field. Nature tries to reach equilibrium.
Also, one atom may absorb and another one may emit. Alternatively, photons with one direction or polarization may be absorbed while photons with another direction or polarization may be emitted. So both processes may occur – and may be independently observed – at the same time. If you needed more details, you would have to be more specific about the experiment in which those two things occur at the same time.