The smell that rain makes comes from when the rain contacts the ground and soil.
When it rains it releases plant oils and chemicals as well as spores in the ground and that causes the smell of rain that is noticeable during and after it rains.
The smell of rain is known as Petrichor.