Welcome to Harry Potter Answers. What would you like to know?

Harry didn't have any idea how to stay underwater for an hour, and Dobby had heard Mad-Eye Moody (Barty Crouch Jr.) talking about gillyweed, so, a few minutes before the Second Task, Dobby woke Harry up and told him that his Weezy (Weasley) was in the Black Lake, and in an hour he would die unless he was saved. He also told him that gillyweed will work and gave him some, which he had stolen from Snape's personal ingredient cupboards.