to say the truth i didn't understand a thing !

please arrange the code and tell us what does it do