Perhaps I'm being a bit technical, but I don't believe Carol, or other space-fairing, non terrestrial beings like the Silver Surfer, Nova, Thanos, and even DC heroes like Superman actually "breathe" in space, per se; they function in space and their muscles may actively pull in and out... but with no known atmosphere, they aren't technically "breathing." As to how they can maintain that kind of functionality... I do have a theory.
First we need to understand why humans breath in the first place, how it effects the body, and why it is necessary.
Without going too in-depth, the process of respiration, essentially, is needed to create energy (or more accurately, "release" energy) within human cells. Our bodies adapted to do this by taking in oxygen in the atmosphere, drawing it into the lungs, where it is diffused into the blood stream and sent to all the cells in throughout. Basically, it's one big, continuous chemical reaction which evolved to facilitate cellular survival. A simplified diagram of it can be seen here....

Now given the intricate nature of this chemical reaction, I'm bypassing a lot of information here, from the release of ATP to functionality of mitochondria within the cells to generate energy via a reaction with oxygen and sugar....

Main Point to Remember: Breathing, aka, the act of respiration, allows our human bodies to produce and release energy.
This is where the differences come in super heroes; their bodies may be humanoid and even genetically mostly human... but due to their super normal abilities, many can bypass the "need" to respire in order to create this energy. Carol is up there in this class of hero; her physical structure doesn't "require" oxygen to facilitate its other energetic functions.
This would seem to be backed not only by Carol's ability to sustain herself, unaided, in the temperature extremes of space, but to "feed" of other energy sources, "go Binary" and increase her powers. Essentially, her body is "generating" or absorbing the energy directly, and thus feeding her cells without the oxygen as a catalyst for the release process. The fact that other beings with enhanced durability or energy projection processes can do this too supports this claim. Thanos doesn't need to "breathe" to survive; Silver Surfer's molecular structure was altered and augmented by Galactus's "Power Cosmique" to be changed on a fundamental level, requiring no food, water, or sleep...he can just feed of the latent energy of stars.
The case of Superman is especially interesting, in that apparently he could always exist in space without air... he just had to "learn" to trust his body to do so. His Kryptonian physiology is capable of sustaining itself in perpetuum once any level of sunlight orange and above is available to him. Still considering himself a "man of earth", however, Clark unconsciously limited himself by thinking he "needed oxygen" to survive in space. A little training from Mongol II laid that fallacy to rest...

Whether Clark was actually breathing within the vacuum is unclear, but what's made apparent is that due to his body's ability to sustain itself, actually oxygen intake was unnecessary. However, these are all comic book based examples.
Bringing this back to Captain Marvel (and I'm presuming you mean the film version here) the reasoning is still basically the same; Carol's body is producing its own energy, or at least sustaining itself in some way due to the energy her body can generate, or repeatedly absorb. We've seen her use or "give off" this energy as it surrounds her body, burning or creating an observable glow in space sans any form of oxygen...

And considering that this version of Captain Marvel was empowered by an Infinite Stone... a powerful object which has been shown in-story capable of altering living beings on molecular levels, as well as warp everything from Space and Time to Energy and Reality... it's not surprising that Carol's tissues and nervous system may have been changed to the point where the need for oxygen is now superfluous. The stone in question was the Space Stone, however, so I'm a bit unsure how that could account for her ability to breath in space exactly, but the stones have been shown to have multiple other affects.