They do get together, and it happens in season six. Spike's interest in Buffy builds through season five, but she rebuffs him completely at first. In season six, while she is in a dark and isolated place emotionally, the two begin a physical relationship that means far more to him than it does to her.
By the end of the season Buffy ends it, and Spike leaves Sunnydale to pursue a soul of his own, believing that is what he needs to be worthy of her love. In season seven they settle into something closer to friendship; she shows genuine care for him across the season, and in the finale she tells him she loves him as he prepares to sacrifice himself. His reply — "no you don't, but thanks for saying it" — is one of the show's most quietly devastating lines.