After some number of postdocs, they can then find a position on the faculty of a college or university, where they teach and do research, or they can get a position at a research institution. I've also known a couple of PhD's who got faculty positions right out of graduate school. While the job search can definitely be a harrowing process, most of the people I know who have graduated recently have found good positions, one way or another. If you are willing to be flexible, it is unlikely that you will end up unemployed. Also, the training astronomers receive is in high demand in other fields.
Astronomers learn to be problem solvers and pick up lots of math and computer skills.
So if the whole astronomy thing doesn't work out, it's not like you've completely wasted the last ten years learning obscure and totally unpractical skills. Salaries for astronomers are comparable. They work a lot with computers so good computer and programming skills are helpful. Some astronomers build their own instruments, so they learn about electronics, materials fabrication,and machining, and other skills. Astronomers need good teaching skills as well, since they teach as much as they learn.