What it is and what it does.
Hidden power is a damage dealing move. Its type is determined by the users IVs.
The Pokemon using it will recieve a STAB boost if the IVs are correct and make it the same type.
Although the game data show Hidden power to be a normal move, a Normal type Hidden power does not exist and because of that Normal type Pokemon will never get a STAB boost(unless it has Normalize).
Same goes for Fairy type Pokemon since a Fairy type HP does not exist.
How the type is determined.
The Pokemon's IVs determine the type.
>The last binary digit for each stat sets the move's Type, and the second-to-last digit sets the move's Power.
Source: bulbapedia page for IVs and Hidden power
Hope I helped.