According to Marvel, the deal is that they get to have Spider-Man for one movie first (most sources say it will be Civil War), and then Sony will continue the franchise with their standalone movie in 2017 (see above). They’ll control the financing and distribution of all future Spider-Man films from then on.
But this also means that Sony and Marvel are essentially collaborating on the same character within the same universe.
This is unprecedented, especially for a $4 billion franchise.
You can read the rest of my write-up on this subject via the link above. I get into the subject of Andrew Garfield and where Sony apparently stands on casting. We don’t know a lot of the details yet, but we can make some pretty reasonable assumptions.