So, what is an Xray signature from a star? Is it a heat sugnature, or an electon bombardment signature?
In a Xrays are produced in regions of gas (plasma, actually) where the temperature reaches upwards of a million or so degrees kelvin. In our sun, for example, like chance says, the Proton-Proton reaction in stars creates gamma rays (not xrays) 4 per reaction. However, it takes a energy created by one photon photon reaction uptwards of a million years to reach the surface of the star, and by that time it's not 4 gamma ray photons, but many many more visible light photons of all sorts of wavelengths that we see with our eyes, and feel on our skin each day. If you want, there is a great demo that is available online here
that really talks about this in detail.
However, the environment around the sun does produce X-rays in its own right, and the first time anyone pointed an Xray detector, they we very surprised to see Xrays around the sun. Like you say, they shouldn't be there and no one is quite sure why the observed temperature is 6000 degrees at the surface of the sun, but is a few million degrees kelvin right above the solar surface, in a region called the corona
. Outside of stars, Xrays can be created by events called shocks, where a wave of energy (say from a nearby exploding supernova) passing through a dust cloud compresses the gas in a way that makes it emit Xrays.
To answer your question: Xrays seen in astrophysics are usually caused recombination of electrons and atoms, like Iron, or by Compton Scattering. Some are caused by synchrotron radiation. Each case leaves a very specific spectral indication which allows you to determine what you are seeing, in the case of recombination, it is a heat signaure, but in the other cases, it doesn't have much to do with heat, but is an indicatore of things like the magnetic field of the object, or other indicators.