How can you enter nasa through which exam?

NASA doesn't have that many personnel, and most are either former military, University grads, or former contractors who have already worked in the Space Program. NASA itself usually doesn't hire new, unproven individuals. However, NASA is a government agency, and like any government agency, you have to apply to the government at large. You can check Government jobs website and see what positions are open, but typically they're written with specific individuals in mind and are only posted because Federal regulations require it.

Aside from that, unless you're a Veteran with hiring preference (and I mean a 10 or 15 point preference) it's essentially impossible to get in unless you're in the right University program or as I said, are already working in the program.

Your best option if you want to work in the Space Program is to apply to work at one of the thousands of contractors support NASA, which make up about 90% of the program anyway.