You get "key items" called Pokegear Apps that allow you to use HMs in the field without having to teach your Pokemon the move so you don't bog their kits down with useless HM moves like Cut or Flash. For the HMs that are actually good (Surf, Dive, Waterfall) that have combat utility, there are replacement moves called Tidal Wave, Submerge and Cascade. You get these Pokegear Apps as you progress through the story campaign.
TMs are infinite use. Hope this answers the question.