Fire is a sustained chemical reaction where carbon-based molecules are broken up and combine with oxygen, releasing carbon dioxide, sometimes methane, and heat (and thus light), which primes the remaining carbon-based molecules for continued chemical reactions with oxygen.
Fire just needs and oxidizer, and their are other elements that can take it's place if their is no oxygen. (I believe bromine and iodine but I'm not sure about that.)
The sun actually isn't made of "fire." It's made primarily if hydrogen and some helium. It "burns" because the immense gravity of all of that matters crushes the hydrogen atoms together, fusing them into more helium. This fusion releases a LOT of energy. For reference of how much hydrogen the sun burns, it burns around 600 MILLION tons of it each second. That's 600 million tons of the lightest element there is.
The sun is made of plasma, and its energy is predominantly from hydrogen fusing into helium. Plasma is what happens when atoms are so energetic that their electrons get stripped from themselves and are bouncing around in a sea of atomic nuclei and other electrons, which does a lot of things with electromagnetism. All that plasma moving around at crazy speeds and low density is what causes a sort of electromagnetic convection in addition to the normal heat-based kind, which is how you get sunspots and solar flares.
As far as fire without carbon, any metal that can oxidize can burn, because it's the reaction with oxygen that releases heat. The issue there is that it's usually not self-sustaining because most of the oxidized metal stays on the surface, so there's no more metal exposed to oxygen. You can get around this by increasing the surface area of the metal, maybe by having it in dust form (so if you had fine enough iron dust, for instance, you could burn it into rust without needing carbon, and that would very much be the image of fire). You also don't need oxygen in molecular form (i.e. O2), it can be part of other metals (like iron oxide, rust), and that will burn with other metals so long as the chemical reaction is self-sustaining (famously, like the thermite, which is rust powder and aluminum powder mixed together at high enough temperatures). These fires aren't "normal" but I think they count.
As far as fire without oxygen at all, while not "normal" and I don't think that counts under strict definitions, there are exothermic (heat-producing) reduction-oxidation reactions that are very close, like when hydrogen gas and fluorine gas combine to make hydrofluoric acid, and those might be close enough that they can look like fire in the right environment (which, again, those environments would be far from normal).