How did stars can shine in the absence of oxygen?

Stars are not actually "burning" in the sense that wood or propane burn. The energy released in stars is not a result of oxygen combining with another element or compound. Stars are massive balls of hydrogen (there are other elements, but I'll use the simple explanation). There is so much of it, that the star's own gravity forces the hydrogen atoms close together, making it more likely that they'll collide. When four hydrogen atoms combine from these collisions, they create one Helium atom. This is called nuclear fusion. This process releases a lot of energy, much of it given off as light and heat. It also energizes hydrogen atoms to become a plasma, where the electrons orbiting the hydrogen nuclei become so energized by the energy released in fusion, that they break away from the nuclei, forming free roaming electrons and Hydrogen ions (protons). Every time an electron rejoins a hydrogen nucleus, it releases that excess energy, which can be expressed as light and heat. Depending on the mass of the star, the star can continue this process by combining helium and hydrogen, helium and helium, helium and lithium, etc, so long as the star has enough energy to force the larger and larger elements to collide. Therefore, oxygen is unnecessary for a star to "burn". It is powered by nuclear fusion, not combustion.