Short version of the story is this.
The Spider-Man movie franchise is owned by SONY, but the majority of the Marvel Movies are done by Marvel which prevented Spider-Man from being in any of the movies even though Spider-Man is the biggest star of the Marvel Universe.
It looks like that will be changing and could led to a MASSIVE box office movie in 2018.
BREAKING: SONY/MARVEL deal reportedly went through; SPIDER-MAN to appear in 'AVENGERS: INFINITY WAR' Part 1. RT pic.twitter.com/2zFUGzrLg5
— Superhero Feed (@SuperheroFeed) January 14, 2015
Nothing official yet, but numerous sources say they are good to go.