It's better to drive than to walk.

Literal

Walk [than-よりも] car [on-に] ride [side-ほう] [subject-が] good.

The canonical XよりYのほうがいい ('Y is better than X') comparative frame. より marks the thing compared against; ほう ('side, direction') is a noun that functions like 'the option/side of Y.' Here both X and Y are verb phrases (歩く, 車に乗る), and ほう attaches directly to the plain form with の implicit.