The earlier models of the atom were constructed using classical mechanics. When Niels Bohr introduced his model of the atom, he not only utilised Newtonian mechanics in his derivation but also incorporated the Planck relation E = hv, which was conceived a decade earlier by Max Planck, a German physicist.
In 1900, Planck was trying to develop a formula to describe the radiation spectrum of a black body when he suggested that electromagnetic radiation is a form of energy that is quantised. The significance of this concept eventually led to development of quantum theory, with Planck being regarded as the father of quantum mechanics.
Quantum mechanics is key to the elucidation of the modern structure of an atom, where electrons are no longer perceived as orbiting in defined paths around the nucleus. Instead, an atom is represented by equations that describe the probability distribution of electrons in space, giving rise to a nucleus that is surrounded by an electron cloud (see below diagram).
In the modern interpretation of the atomic structure, electrons are distributed in an atom in specific energy states that are characterised by mathematical functions known as orbitals. The maximum number of electrons that an orbital can accommodate is two (see this article for details). Orbitals with similar shapes form a subshell (characterised by a unique set of (n, l), e.g. p_{x}, p_{y }and p_{z} forms the subshell p), and subshells with the same energy in the absence of an external magnetic field, constitute a shell (e.g. 2s and 2p subshells constitute the shell n = 2). Diagrammatically, we can describe the energy states as follows:
Mathematically, the energy states are defined by four quantum numbers, n, , _{ }and m_{s}, as shown in the table below.
Quantum numbers 
Details 
Example 

Symbol 
Name 
Values 

n  Principal  Each value of n refers to a shell 
n = 1 and n = 2 are the 1^{st} shell and 2^{nd} shell of an atom respectively. 

Angular  Each value of refers to a subshell where 
For the 1^{st} shell (n = 1), , i.e. the 1^{st} shell consists only of the subshell s. For the 2^{nd} shell (n = 2), , i.e. the 2^{nd} shell consists of two subshells, s and p. 

Magnetic 
with a total of values 
Each value of refers to the orientation of an orbital in a subshell. The total number of values in a subshell also refers to the total number of orbitals in that subshell. 
For the 1^{st} shell (n = 1), , and , with a total of one value, i.e. there is only one orbital in the 1^{st} shell. For the s subshell in the 2^{nd} shell, with a total of one value, i.e. there’s only 1 orbital in the s subshell with a single orientation. For the p subshell in the 2^{nd} shell, with a total of three values, i.e. 3 orbitals in the p subshell, with each orbital having a distinct orientation. 

Spin magnetic  or  Each value of refers to the spin orientation of an electron. 
refers to a spinup electron, while refers to a spindown electron 
In other words, the four quantum numbers describe the energy state of an electron in an atom. The numbers are a result of many scientists’ work that were done during the early 1900s. Some of these experiments and theories that contributed to the development of quantum mechanics are listed in the table below.
Year 
Work  Scientist 
1900 
Planck’s law 
Max Planck 
1905 
Photoelectric effect 
Albert Einstein 
1924 
de Broglie’s hypothesis 
Louis de Broglie 
1925 
Schrodinger equation 
Erwin Schrodinger 
1925 
Pauli exclusion principle 
Wolfgang Pauli 
1926 
Born interpretation 
Max Born 
19201930  Aufbau principle, Madelung’s rule and Hund’s rule 
Niels Bohr, Wolfgang Pauli, Erwin Madelung, Friedrich Hund 
1927 
Heisenberg’s uncertainty principle 
Werner Heisenberg 
We shall elaborate on the above in the following articles.
Question
Does the energy level diagram for shells and subshells apply to all atoms?
Answer
The above energy level diagram is a result of the solution of the Schrodinger equation for the hydrogen atom, which has degenerate subshells, i.e. subshells belonging to a particular shell (e.g. 2s and 2p for n = 2) have the same level of energy. The degeneracy of subshells disappears for multielectron atoms due to electronelectron repulsion and the shielding effect of orbitals. For a particular shell in a multielectron atom, the smaller the angular quantum number, the lower the energy level of the subshell within that shell.