The sentence you provided is missing the word "so." It's likely you meant to write:
"It's often hard to know which way to go."
In this case, "it's" is a contraction for "it is" and acts as a pronoun, while "hard" is an adjective modifying the verb "to know," and "which way to go" is a noun phrase acting as the object of the verb.