Well, there's a really specific pattern to follow to get to the gym leader (across the ice, that is), and for more inforamtion head to this site: http://www.psypokes.com/rs/images/8thgym.png As for him, go to this site: http://www.psypokes.com/rs/walkthrough.php?part=8 It's on the bottom of the page.
The only way to get a gym badge is to challenge the corresponding gym leader and win.
I get my 8th badge in Sootopolis gym.
Petalburg city he's in the gym and you battle him for your 8th badge.
at the gym
the ground gym
Beat the 8th Gym leader.
it's in the woods between the first gym badge and 5th gym badge
It's in the gym when you're done defeating the leader he will give you the TM (8th badge)
Beat the gym leader
Pokemon league
you beat the gym leader
Sunnyshore City Gym: Electric (beacon badge from Volkner)