By now it's no spoiler, Anakin Skywalker met his demise as Darth Vader in the Star Wars series. If you had watched any of the trailers for Star Wars: The Force Awakens, you would have seen one of the film's characters speaking to the melted helmet of Darth Vader. While a character acknowledges Vader, there could have been more for Vader.
Anakin could have made an appearance in the latest installment of the series, but ultimately, he did not.
According to the 'Art of Star Wars: The Force Awakens' book, Anakin would have appeared as a Force ghost in the film. Concept artist Iain McCaig offered image of how he could have been portrayed, along with a detail in the book:
"When you light a candle, you also cast a shadow.’ That inspired me to propose, for the first time, that Anakin’s ghost could come back […] If we see Anakin Skywalker, because he does flow back and forth between Darth Vader and Anakin, let’s see him as a character with a dark and light side. The reason Luke is this whole new entity is because he was the first to acknowledge his own dark side — that it was not separate from him."
In the image above you'll see the evolution of how he could have been portrayed (it looks like he goes from dead Anakin, to dead Anakin-Vader, to dead Darth Vader).
It appears as though this cameo didn't make it into the film because it was 'too much' for one film. That's ok though, Vader will be making his appearance in Rogue One.