Air is lighter than water.
Therefore, when Jimmy takes a deep breath, he fills his lings with air which is lighter than water, therefore, he floats.
On the other hand, when he releases his breath, he loses the air, therefore, he sinks in the water.
You can imagine your lungs as a balloon. When you fill the balloon with air, you will find that the balloon floats in water.