Shazam belongs to DC Comics. DC has developed the character and its related storylines over the years. The powers and origin of Shazam are integral parts of the DC universe.
Captain Marvel is Carol Danvers. She gained her powers through an interaction with alien technology and has become a powerful hero in the Marvel universe.
Yes, Captain Marvel in the movies shares many similarities with the comics. The character's powers, personality, and key story elements are largely in line.