In the eighties/nineties, Marvel comics was on the verge of bankruptcy. They were kept afloat because they had the license to produce Star Wars comics but otherwise they were literally selling filing cabinets to stay in business. So for a bit of a cash boost, Marvel sold the film rights to their most valuable characters for pocket money. This meant that when Marvel established their own film-production company (Marvel Studios) they didn’t have lawful permission to use their A-listers (Spider-Man, X-Men, Daredevil etc).
This led them to have to establish their interconnected film universe on the backs of less famous properties. They called this project the Marvel Cinematic Universe and based it on B-listers like Iron Man, Captain America and Thor. Fast-forward to today and the MCU is the single most successful film franchise in history. Six of its 21 films are in the top 20 highest-grossing of all time. These are what people are usually referring to when they talk about a ‘Marvel movie’.
The Incredible Hulk is a unique character in that Marvel studios only owns some of him.
Universal Pictures also owns some distribution rights. This means that Marvel can’t produce a Hulk movie without giving Universal a cut of the profit. This is why Hulk no longer gets his own solo movies as Thor and Iron Man do. If he appears in an ensemble movie like the Avengers or Thor: Ragnarok, Marvel keeps all the cash from that and Universal gets nothing. This doubtless makes them angry, but unlike Bruce Banner, Marvel doesn’t really care when they’re angry.
X-Men, Daredevil, The Fantastic Four and Deadpool
Twentieth Century Fox bought all these characters from Marvel back in the day. After producing one terrible Daredevil movie in 2003, they eventually sold the rights back to Marvel who promptly began producing the excellent Netflix series. The X-Men, Deadpool and Fantastic Four though, remain at Fox. Fox produces all films that involve characters relating to any of these properties but have only found any real success in the X-Men and Deadpool franchises which vary hugely in quality. For some reason, a weird clause in their contract dictates that they have to keep producing films or the rights automatically go back to Marvel. This is why they keep trying to reboot Fantastic Four with increasingly worse movies.
Interestingly, because Disney (who owns Marvel studios) is about to purchase 20th Century Fox for $71.3 Billion, these characters will probably end up being rebooted and folded into the MCU in the next few years.
Probably Marvel’s most famous creation, one of the three biggest superheroes in the world, Spider-Man (and all associated characters) was bought by Sony. This is who produced the trilogy of films in the noughties. After disappointing feedback to their two Amazing Spider-Man films, Sony entered into talks with Marvel Studios. They agreed that Marvel could include Spider-Man in their film Captain America: Civil War and no money would change hands. After the success of that film, Sony agreed to produce Spider-Man: Homecoming which is still technically a Sony film but in association with Marvel. This essentially means that Marvel now makes the films but Sony gets the money from ticket sales. This is why Marvel can include the webhead in films like Infinity War despite not actually owning the character.
Similarly, because Venom is primarily a Spider-Man villain, Sony both owns and produces his films. So don’t expect him chatting with Rocket Raccoon any time soon.
Weirdly, all of the above refers only to film rights. Marvel Comics still owns all rights to every character in every other medium. Ironically, this means that Spider-Man (the world’s most popular superhero in terms of merchandise) probably makes Marvel the most money out of all those mentioned despite being the only one they are nowhere close to owning.