His name was Aragog. He was given to Hagrid when he was but an egg. Hagrid kept him in a cupboard at school and fed him on table scraps. When the basilisk was making its first attacks, everyone suggested Hagrid, simply because of Aragog.
Aragog is an acromantula, a type of massive spider. Slughorn, at the funeral, collects some of Aragog's valuble venom.