You get it damp, put it over the shape, and then adjust the hat to be the shape you want it, and let it dry.
Personally I like to use something that I can pin the hat to, to get it to the shape I want. You can get polystyrene 'heads' or make a papier mâché ones. Shorter term, a pair of tights, stuffed with others, makes a possible alternative though it doesn't dry as fast.
Blocking knitting gives it a good 'finish'.