how do I use the walker class to display categories in their correct heirarchy?

There is number of functions that deal with categories. Some are meant to be used with other code and mostly deal with category objects, some are meant for displaying on front-end and outputting HTML.

wp_list_categories() for example is meant for front-end presentation and defaults to hierarchical display.