I'll explain this briefly. You have your x and y, obviously. The vy is also called "the change in y". You don't want to change y by a constant amount, because it isnt realistic; therefore, we need a changing number. This will suffice. The last important one is the jumping variable, which we use to detect if a character is in the air.
First, we check to see if the player has pressed the up button. If the player hasnt already jumped, then the character will begin to "jump", or we set the vy variable. The part next to it isnt nesessary. All it does it see if the player has let go while the character is jumping. If they have, it stops going up and goes down. This only happens, however, when the character's vy is greater than 0.5. After this, the function will be counterproductive.
"if y < 5 then..."
I set 5 to be the ground. When he goes below the ground, I say he's not longer jumping and set vy to 0. Lastly, I add vy to y and if the player is jumping, I take gravity away from vy. Thats basically it.