They use a formula for it based on your pokemon's IVs. it helps determine the type as well as the power. of the move. It can be as weak as base 30 to as high as 70. The best numbers to get are 60 or 70 base power. (60 base power if your pokemon has the ability technician.) This is the hidden power formula:
A =HP IV.
Then after rounding down, whatever number you get will give you this type.
Basically, hope you get lucky with the types in game. There are people who can tell you what type your hidden power is, like in HG/SS, the guy is in the Celadon game corner prize building.