It is to be regretted that some of the other reviewers on Amazon.com gave away spoilers. It is also unfortunate that Heinlein has received a lot of press for some of the worst things he wrote for an adult audience, such as _Stranger_in_a_Strange_Land_. His genius was in his "juvenile novels" -- the stories he wrote for serialization in boy scout magazines, later published as books.
Max Jones dropped out of high school to support his lazy irresponsible stepmother by working on their farm, which has few amenities that would not have been commonplace in 1850. But he dreams of becoming an astrogator aboard a starship like his late Uncle Chet who instructed him in that profession. When his stepmother marries a man who is uneducated and cannot appreciate his ambition, Max leaves. The world being badly mismanaged, he must hitchhike to the city of Earthport to find out whether he has been appointed his uncle's professional heir.
What happens over the ensuing chapters I will not divulge. Heinlein was a graduate of the Naval Academy, where he learned some of the laws in force aboard ships. While Max is serving aboard a ship that has become lost and set down on an unknown planet, with no realistic hope of finding its way home, the First Officer explains to the passengers and crew certain legal rights and obligations that apply in such an emergency. A passenger objects: "There are no laws HERE." The First Officer corrects him, saying the law goes where the ship goes. That sets the context for a climax several chapters later, involving legal, moral, political, and psychological aspects of leadership in an emergency.
The book dramatizes the role of intelligent purposefulness in human life. A scene occupying about the first four pages of the second chapter is a beautiful example: Max is alone facing difficulties and using his head.
The book has various readily identifiable flaws, which it would be easy for me to list. Those don't matter at all.