We won't get into deep into the details here but Sony maintains their ownership of the character, while this new Spider-Man, and all of the spinoffs and followups, are now set within the same cinematic space as Marvel Studios' films and television projects. It's a genius move and a precedent setting one. Spider-Man will continue to make money for Sony, now bolstered by Marvel's help (and you can bet Marvel characters will show up in Spidey movies going forward), and Marvel can acknowledge that there exists Spider-Man in their fictional version of New York and use him where necessary as well (think future Avengers movies).