With the limited info in the question and the fact that you say smoke noriced at the top where the fan is indicates there's a problem with the power supply. The p/s has a radial fan and most of the high current wiring is here. Therefore, be careful using the PC because of a fire hazard. Rather just open the side panels and ascertain for certain where the smoke is coming from. The P/S unit is easily spotted.
Another possible source is the CPU which is also fan-cooled and which gets very hot, although protection circuits ought to switch it off before it gets hot enough to smoke.