Huck's attitude towards Jim at the beginning of the novel is, what seems to us, rather harsh and racist. He thinks that Jim is less than a man, ignorant, without real feelings, and property to be owned. Granted, we can't really blame Huck for this attitude; it was the result of his upbringing in a racist south where slaves were indeed seen as ignorant and worth less than a white man. His entire life, Huck had been taught by everyone around him that slaves were property, and not worthy of education or care.
Even though Jim is kind to Huck, and does quite a bit for him, Huck still has a hard time viewing Jim as anything other than a slave and all of the stereotypes that come with it. He plays mean pranks on Jim that show he assumes Jim is an emotionless toy to be messed around with--take for example the lie after they lost each other in the fog. Jim thought Huck had died, and was lost forever, and Huck tries convincing Jim that it had all been a dream. That shows how stupid Huck thought Jim was, and how little he regarded his feelings. Also, when arguing with Jim about languages and King Solomon, Huck gives up, saying, "You can't learn a nigger to argue, so I quit." This implies Jim is too stupid to see reason on any subject. When Jim gets excited as they approach Cairo, Huck is angry that Jim would have the audacity to consider "stealing" his own children back, children that "belonged to some other man." This shows clearly that Huck still thinks that slaves are property, not real humans with family ties.
By the end of the novel, Huck sees Jim as a human being that is his equal. He thinks to himself, "I knew'd he was white on the inside," which implies that even though on the outside Jim was black, he was really equal to Huck. Several events turn Huck to this opinion. One is Jim's continual friendship while they are on the raft, and his chastisement of Huck for being mean. It helps Huck to see more clearly. Other incidents are when Huck discovers that the duke and the king sold Jim--at this point Huck reallizes just what a true friend Jim was. He had always had Jim there before, but now that he had gone, he realized just how much he meant to him. He tries to write a letter to Miss Watson, but can't do it, and declares, "I'll go to hell then!" and tears the letter up. This shows that he is willing to lose his soul in order to help Jim--that is quite the sacrifice. Then, when Jim puts up with all of Tom's foolish ideas about prisoners, Jim earns Huck's respect. Lastly, when Jim offers to stay with Tom while Huck gets a doctor, this proves to Huck that Jim is a friend because he is willing to sacrifice his freedom to help Huck out.
I hope that those thoughts helped a bit; good luck!