X-ray emission from compact groups of galaxies