In the more recent games, there are NPCs that you can talk to and they will tell you what type of Hidden Power your Pokémon has. According to Bulbapedia, the locations of the NPCs are:
- Platinum: Veilstone Game Corner
- Heart Gold/Soul Silver: Celadon Game Corner
- Black/White: Mistralton City
- XY: Anistar City
- South-Eastern-most house
- Also the location of the Hidden Power TM.
- Omega Ruby/Alpha Sapphire: Fortree City
- Top row of houses, second from the left.
- Also the location of the Hidden Power TM
If you want to find out through combat, here's something I threw together (Disclaimer: there's likely a much more efficient way to figure it out):
1. Battle a Patrat / Lillipup.
Super effective: Fighting. Didn't affect: Ghost. Normal effectiveness: goto 2
2. Battle a Cottonee / Petilil.
Super effective: goto 3. Not very effective: goto 4. Normal effectiveness: goto 5.
3. Battle a Klink.
Super effective: Fire. Not very effective: goto 6. Didn't affect: Poison.
4. Battle a Roggenrola.
Super effective: goto 7. Normal effectiveness: Electric.
5. Battle a Sewaddle.
Super effective: Rock. Normal effectiveness: goto 8.
6. Battle a Woobat.
Super effective: goto 9. Normal effectiveness: goto 10.
7. Battle a Ducklett.
Normal effectiveness: Grass. Not very effective: Water. Didn't affect: Ground.
8. Battle a Sandile.
Normal effectiveness: goto 11. Not very effective: Dark. Didn't affect: Psychic.
9. Battle a Ferroseed.
Normal effectiveness: Ice. Not very effective: goto 12.
10. Battle a Timburr.
Super effective: Flying. Normal effectiveness: goto 13. Not very effective: Bug.
11. Battle a Darumaka.
Normal effectiveness: goto 14. Not very effective: Steel.
12. Battle a Drilbur.
Normal effectiveness: Dark. Not very effective: Rock.
13. Battle a Trubbish.
Normal effectiveness: goto 15. Not very effective: Poison.
14. Battle a Deino.
Super effective: Dragon. Normal effectiveness: Normal. Not very effective: Dark. Didn't affect: Psychic.
15. Battle a Blitzle.
Normal effectiveness: Dragon. Not very effective: Steel.
My thought process (possible types at each stage) is in the revision history of this answer.
Best Answer
Each time you walk 256 steps, there's a 5% chance that an empty Hidden Grotto will respawn its contents, so even if you walk a lot, there's a big chance it will stay empty for a while.
Also, here's the Bulbapedia article on Hidden Grottoes, with their locations and possible items and Pokémon.