There are many different types and styles of heaters, from the style that hangs on the rim of the tank, to fully submerged and even substrate heaters. Nearly all will have a way to secure the heater into place, either by suction cups or by a screw type vise/clamping system.
At any time you notice water / condensation INSIDE the heater you should discard it and get a new one, nothing worse than a heater breaking in your tank injuring your fish.
If you keep large species of fish, a cage to prevent accidental burning or breakage is strongly encouraged.
The best way to judge what heater size to use is to follow the MINIMUM guidelines below:
10 watts per gallon for an aquarium up to 24 inches long (60 cm).
6 watts per gallon for an aquarium up to 48 inches long (120 cm).
4 watts per gallon for an aquarium larger than this.
So for example a tank 24 x 12 x 12 inches (45 x 25 x 25 cm) the minimum heater size would be 30 - 60 watts.
You can always buy a larger heater, in fact it is recommended that you do buy one a bit higher than these minimums, that way the heater does not have to work as hard, nor die as quickly saving you money in the long run on more frequent heater replacements.