(Disclaimer: I am only a highschool student and have learned the following mostly on my own. If there are any mistakes, please feel free to correct me!)
An atomic orbital represents the probability distribution* of the location of an electron around the nucleus and is mathematically described by a wave function.
Now what does this mean? Let's start with what an atomic orbital (AO) isn't:
- An AOorbital is notnot a fixed spatial region or a "container" in which an electron can move around - In Quantum mechanics, an electron does not have a specific location.
So what is an atomic orbital?
As mentioned before, the electrons don't have a fixed position (and momentum, but this seems less relevant to me at this point), so we cannot determine its position to a single point - this only happens when we measure the position.
When we measure the position, we find it to be more likely to be present at some points than at other points. This is what is meant by the probability distribution - it simply describes the probability of "finding" an electron when measuring its position for every point in space. So theoretically, there is a probability that at any point in time, some electron is 100km away from the atom it belongs to, but this probability is extremely small. (see What is the probability for an electron of an atom on Earth to lie outside the galaxy?)
Now assume that we measure the position of the electrons for 1000 times and plot the measured positions to some 3-dimensional model of our atom. We will find that in 90% of the cases the electron is in a certain area of space and this is usually depicted by the familiar AOatomic orbital shapes:
(Source)
So the shapes of the AOorbitals as they are most often depicted is usually chosen in such a way that the probability of finding the electron inside this shape (when measuring its position) is at least 90%. However, note that the electron is not constrained to this shape and there is a probability that it is measured outside.
There are some other things to mention about AOsorbitals apart from their "shape". One of these is that every AOorbital has a certain energy level associated with it. This means that when an electron is in AOan orbital $A$ it has the exact energy associated with $A$.
If there is another AOorbital $B$ with higher energy level than $A$, the electron in $A$ can "jump" to $B$ if it absorbs the exact amount energy which is the difference between the energy levels of $A$ and $B$. The most common example is an electron absorbing a photon which has the wavelength that corresponds to the energy differents of the AOsorbitals. Likewise, electrons can jump to AOsan orbital with lower energy baby emitting a photon with the wavelength corresponding to the difference in energy between the AOsorbitals.
Here is a graph showing the relative energy levels of AOssome atomic orbitals:
(Source)
I hope this somewhat clears up the confusion.
*As mentioned in the comments, the wavefunction $\psi$ describing an AOatomic orbital does not directly give the probability density, but the probability amplitude. ProbabilityThe probability density can be obtained by $|\psi |^2$ for complex orbitals or $\psi ^2$ for real orbitals.