Sony owns the rights to Spider-Man (and Venom), 20th Century Fox has Fantastic Four, Silver Surfer, Deadpool, the X-Men (including Wolverine) and Cable. Marvel Studios (now owned by Disney) owns the rights to all other Marvel Characters.
Something to keep in mind is this only applies to the film rights. The reason the rights are spread all over the place is that Marvel Comics tried to make films based on their characters throughout the late 70s and 80s. Most of them were low-budget and did poorly at the box-office (if they made it that far). After losing a bunch of money, other studios approached them about licensing those characters. Marvel said yes and then those companies proceeded to make tons of money by making the movies right (see X-Men, Spider-Man, etc). Once Marvel saw that, they ended up starting Marvel Studios and have since gone on to make some great films.
However, by then they couldn't get back the film rights that they already sold off. Unless Spider-man films and X-Men movies start losing money for Sony or Fox, it's highly unlikely that they will ever let those rights go back to Marvel.