Stars, like our Sun are balls of gas, mostly made up of hydrogen, the simplest element (atom) that exists. The central regions of the star become hot and fusion can occur, where four hydrogen atoms combine to become a helium atom. The energy released during this process is what makes the stars shine brightly.
Some stars are massive compared to our Sun - their mass can be as much as 200 times the mass of our Sun and have a radius 1000 times greater! They can be as bright as a million Suns and have a surface temperature of 150000 degrees! These stars can be detected in lowest energy X-ray band. Others stars are much smaller and have only a tenth of the mass of the Sun, and a radius that is 1/25 that of our Sun! These stars are much cooler, with a surface temperature of only 2000 degrees. Such cool stars can have strong magnetic fields that can heat the gas to temperatures that emit in the X-ray domain and we observe many of these cool stars with XMM-Newton. Alternatively, as a star forms, the clouds of gas are channeled through an accretion disc which can become very hot in the central regions and emit in X-rays.