Bones is a Golden Retriever Sam befriended when he was young. Sam ran away while Dean was looking after him in Flagstaff (John was on a hunt). He and Sam spent two weeks on his own, living on Funyuns and Mr. Pibb.
In Dark Side of the Moon, after Sam and Dean were shot dead, both ended up in Heaven. There they visit memories from their past, including the time Sam ran away and spent 2 weeks on his own, with Bones - a happy memory for Sam, but shortly after revealed not so good for Dean who spent the whole time in stress and dispair thinking Sam was dead at the time.