In SS and HG by using a heart scale
Sorry Staraptor, but you can't use the heart scale guy to relearn TM moves. Only moves learned by leveling up csan be remembered. :(