Captain Marvel can refer to Carol Danvers (the better known version) or Captain Mar-Vell, her male predecessor. Use with the [marvel] tag. Use for questions about the character(s) and not merely questions that mention them. For questions about the DC universe hero, use the [shazam] tag. For questions about the 2019 film use [captain-marvel-2019].
Originally, the hero was a Kree named Captain Mar-Vell. Humans, hearing his name, simply started calling him Captain Marvel.
A consort of his, Carol Danvers, eventually became half Kree and gained powers similar to his. When Mar-Vell left Earth, Carol began to call herself Ms Marvel and became a hero in her own right. Eventually she took the title of Captain Marvel. The Danvers work makes up most of the comics under the name.