What does he ozone layer do?

Ozone layer in stratosphere absorbs the UV rays. These UV rays are fatal for life on earth.