In this paper we describe the implementation of a ghost-cell immersed boundary method for compressible flow with Dirichlet, Neumann and Robin boundary conditions. A general second-order reconstruction scheme is proposed to enforce the boundary conditions via ghost points. The convergence test shows that the present method has a second-order accuracy for three types of boundary conditions. Laminar flow heat transfer problems are used to test the capability of the present method to handle different boundary conditions with stationary and moving boundaries. The compressible effect on the heat transfer process is then studied to illustrate the advantage and necessity of combining IB methods with a compressible flow solver.