The tournament itself consists of three challenges faced by the three champions, one from each school (In Harry's 4th year when Hogwarts held the tournament, his name was pulled out of the Goblet of Fire along with Cedric Diggory's, but that has never happened before and probably never will again. Barty Crouch, disguised as Mad-Eye Moody Confounded the Goblet into choosing an extra name). The Challenges are designed by the host school to test the champions in many different ways: their magical prowess, their daring, their powers of deduction, and their ability to cope with danger. Cheating is part of the game. The judges include the heads of the three schools.
The tournament has a long history of danger. It was stopped in 1792 when a cockatrice the champions were supposed to catch went on a rampage and all three contestants were injured. Dumbledore reinstated the tournament in Harry's infamous 4th year as an opportunity to reach out to the other schools.
The champions Harry's 4th year were Cedric Diggory and Harry Potter from Hogwarts, Fleur Delacour from Beauxbatons, and Viktor Krum from Durmstrong.
--Harry Potter describing the first Triwizard task to Cedric
Cedric: "I realise I never really thanked you properly for tipping me off about those dragons."
Harry: "Forget about it. I'm sure you would've done the same for me."
Cedric: "Exactly. You know the Prefects' bathroom on the fifth floor? It's not a bad place for a bath. Just take your egg and...mull things over in the hot water."
--Cedric, returning Harry's favor