In a similar manner as one gets to Carnegie Hall.
But seriously, let's step back a bit here. The vast majority of scientists and engineers working on planetary exploration *do not* work for NASA. Nor do they live in America.
I got my degrees in Britain, worked as a post-graduate research assistant at various universities, worked for a while in Japan in the same capacity. During that time I was involved with 3 spacecraft missions (one to Mars, one to Saturn, one to a comet) and built hardware that flew. I then snagged a post-doctoral position in Holland, and continued my studies.
So, get as good a BSc as you can, and then look at the next steps. If you want to actually reach flight crew status then you'll seriously need to look at NASA's astronaut training criteria.
If, on the other hand, you are content to *merely* study data, create new and exciting instruments, operate systems on far-off worlds, publish ground-breaking data, and generally have a great time, then you do *not* need to work for NASA. Plus, you may well have more freedom outside of NASA, don't get me wrong, many of the centres are great places to work, but the funding is rarely certain and often has a political tinge.
So, apart from private companies, like Boeing, Ball Aerospace, LockMart, SpaceDev, Raytheon, etc. we have academia.
Most universities worth their salt will have an astro/phys department, many of them will be engaged in future or current missions, or in more speculative studies. For example, I spent 3 years recreating the martian environment, for the science, not for a specific (and therefore possible-to-be-cancelled) project. Most spacecraft projects subcontract out the instrumentation to university departments or institutes, where the Principal Investigator will reside. There, with whip and chair, they guide the post-docs and research associates to create new devices.
Some departments spin-off into entire institutes (like SSTL and to a degree, like JHU's APL) and can become partially or 100?elf-funding - ask yourself if you want a wage regularly, or are willing to hop from project to project?
Anyway, start with learning what sort of tasks are out there.
Further afield (ESTEC's a fine place, a bit windy tho)
Now, if after all that the idea of a new culture and better coffee does not appeal, then the best way to get into NASA is to simply excel in your enthusiam, ability, and skills.
Seriously. Read around your subjects, and choose a discipline that you can focus on. For example, astrobiology, astronomy, and astrophysics are all very different fields with their own journals, world-class scientists, jargon, funding crises, etc.
Make sure that you also round-out the non-work aspect of your life - NASA, like any space agency, wants people who can communicate and play well together - so brush up on life skills and perhaps pick up another language (always a good idea anyway - you *will* be travelling).
Above all, keep your eyes open - ask around in your current departments as to who is doing what, attend post-grad (yes, post-grad) workshops and lectures, get a summer job in the phys/astro department (filling nitrogen Dewars, whatever), and start networking.