A gamin (a street "urchin" or homeless child) whom Mr. Earnshaw brings back with him on his three-day trip to Liverpool, the newly named Heathcliff is named after an Earnshaw child who has died. When Earnshaw arrives home, exhausted, he collapses into a chair, opening his coat and revealing the child, and telling his wife that they would bring up the gamin child as their own though it seemed more of a gift from Hell than a gift from God:
"I was never so beaten with anything in my life, but you must e'en take it as a gift of God; though it's as dark almost as if it came from the devil." [Chapter 4]
At first neither Hindley or Catherine like him because Heathcliff is dark and dirty and has cost them their gifts from their father as Hindley's fiddle has been broken and Catherine's whip lost in Mr. Earnshaw's struggles with the boy. Soon, however, Heathcliff becomes Catherine's playmate and confidant, although she later remarks that Heathcliff is not proper for her as a lady after her stay with her cousins at Thrushcross Grange. Further, Heathcliff becomes the brunt of Hindley's jealousy as Mr. Earnshaw favors Heathcliff at times. This relationship foreshadows latter conflicts and hatred that motivates the actions of Hindley and Heathcliff both.
Heathcliff's stay at Wuthering Heights has a lot to due with many things. Occupying Wuthering Heights initially started as a part of Heathcliff's plan to exact revenge on Hindley, Catherine's brother, for all the wrong doings that were done to Heathcliff. However, over time I think Heathcliff stays because it's the closest thing he has in regards to Catherine.