Gandalf says "fly, you fools!" .
Teh deal with Aragorn and Boromir is complex.
Basically, to explain things as best I can for the movie audience: Isildur had two kids. One of them (the younger) was king of the southern kingdom, Gondor. The other was king of the northern kingdom, Arnor.
About a thousand years ago, the nation of Arnor collapsed due to internal & external strife. The royal line survived, however, and Aragorn is the heir to the throne of Arnor (and, hence, the 'heir of isildur.")
About 900 years ago, the nation of Gondor lost all surviving members of the royal line (in battle and a few other bad things that happened simultaneously.) For a variety of reasons, one of which being that the final king disappeared/was captured rather than simply dying, rather than choose a new dynasty, they (or, rather, the last king, shortly before he vanished) appointed a steward to "hold the throne" till the king got back. This Stewardship became an inherited office. basically a de facto kingship. Boromir's father, Denethor, is the heir in direct line to that first Steward, and Boromir is his heir.
So, basically, Aragorn is a king without a kingdom, and Gondor is a kingdom without a king. Both king and kingdom trace their heritage back to the same legitimizing authority, Isildur's establishment of the two kingdoms.
Aragorn has a somewhat-legitimate claim to the throne -- since no lineal descendant of isildur's younger son survives to rule Gondor, and Aragorn is the direct lineal heir of Isildur's eldest son, and, therefore, Isildur himself too. However, the Ruling Stewards in Gondor don't much like this idea, for obvious reasons.
It's a bit complex and you have to dig around inthe appendix to the last book in the trilogy to figure it all out. So, all things considered, think they did a fairly good job of presenting a relatively complex situation in the movie.