Sony Motion Pictures signed a deal with Marvel Studios that the new Spider-Man will appear in Marvel Cinimatic Universe (MCU) first. Afterwards, Sony will release the next installment of the Spider-Man franchise on July 28, 2017, in a film co-produced by both Kevin Faige and his team from Marvel as well as Amy Pascal, who oversaw the launch for Sony back 13 years ago. The studios will henceworth collaborate on a new creative direction for our Friendly Neighborhood Spider-Man, however, Sony will have final say, distribution, financing, and ownership.
If you're wondering why this is such a big deal, years ago before Marvel launched Marvel Studios and started bringing their hereos in house for films, they sold off the movie rights to various studios. In this case Sony got Spidey and for Reference Fox has the X-Men, Fantastic Four, and few others. Wonder why you saw a bigger toy push for Guardians of the Galaxy, a new entry into the MCU, instead of X-Men: Days of Future Past? After all most hereos in Marvel are either an Avenger or an X-men, if not both. That's cause Marvel had both toy and movie rights for Rocket and Company. It's also meant you wouldn't see characters owned by different studios in another studios film.
Both Studios are looking into bringing in MCU characters into Spider-Man films down the road.