Before Huck runs away, he thinks of Jim as a superstitious but amusing and at times useful slave. Jim helped Huck by using his hairball to predict Pa's plans - although the prediction given by Jim wasn't accurate.
When Huck discovers Jim on the island, he "was glad to see him" for some companionship. Huck quickly comes to realize that Jim had knowledge and skills that he lacked, and that his presence was going to be helpful during his adventure on the river.
Jim said if we had the canoe hid in a good place, and had all the traps in the cavern, we could rush there if anybody was to come to the island, and they would never find us without dogs. And besides, he said them little birds had said it was going to rain, and did I want the things to get wet?
As their adventures continue, Huck comes to understand that Jim was a person with feelings, emotions, dreams and fears just like his. Huck's feelings about slavery change as he realizes the true meaning of selling one person into the ownership of another. He comes to the conclusion that Jim was his faithful friend and that he could do nothing to betray him. "Somehow I couldn't seem to strike no places to harden me against him, but only the other kind."