This parsha discusses fundamental aspects of the leadership of the Jewish people. It begins with the discussion of judges, and later discusses the concept of the king of Israel.
In this first aliyah we are told to appoint judges at all the gates of our cities. The Lubavitcher Rebbe associated the concept of "gates" with a person's senses: We are being told to appoint judges to guard our five senses discriminating what we see, hear, taste, smell, and touch.
About the judges we are told that they should not pervert justice by doing things like accepting gifts, which the Torah says blinds the eyes of the wise. Also in this aliyah are commandments to not sacrifice blemished sacrifices, penalties for idol worship, and the procedure for a supreme court.
The second aliyah gives some laws of a king of Israel. The Torah says that G-d will choose the king. Furthermore, this king shouldn't amass too many horses for himself, or wives, or gold and silver. The king must write for himself two scrolls of the Torah and keep one with him at all times and learn from it every day. In the sefer Derech Mitzvosecho, it says that this mitzvah of a king of Israel has the purpose of instilling in us the fear of G-d, and our subjugation to Him, and our acceptance of the Yoke of Heaven. This is because the king of Israel is himself nullified to G-d, therefore, when the Jewish nation subjugates itself to a king, they nullify themselves to G-d as well.
The third aliyah contains a discussion of the portions to be given to the Leviim and the Kohanim. As discussed earlier in the Torah, the idea is repeated here that the Kohanim and Leviim had no portion of inheritance in the land of Israel. G-d says that He is their portion. This aliyah contains details of which offerings brought by Jews will be eaten by the Kohanim and Leviim.
The fourth aliyah contains some laws of forbidden divination and prophecy, like using a soothsayer or an enchanter or a sorcerer. These things are called here an abomination to G-d.
The fifth aliyah establishes the idea of the prophet of Israel. Because at Mt. Sinai the Jewish people claimed they couldn't hear G-d's voice directly, G-d here says that He will raise up prophets and that G-d will put words into their mouth. We are commanded to listen to the prophets.
Also in this aliyah is a reiteration of the command to establish cities of refuge for the inadvertent killer and some laws of murder.
The sixth aliyah gives the commandment of not moving a land boundary to fraudulently acquire land. Here also is a law of witnesses, where we are told that at least two witnesses are required for certain convictions. Also here is the law of a witness who testifies falsely: He shall have done to him what he intended to happen to the defendant. In this aliyah is the expression: an eye for an eye, a tooth for a tooth, which Rashi says, refers to monetary compensation for a physical injury.
Here are procedures for war. It says here that we are not to be afraid because G-d is with us. On the subject of war, verse 20:3 begins with the words Shma Yisroel. Rashi says this means that even if a person has only the merit of the mitzvah of saying the Shma alone, he still is worthy that G-d should deliver him from battle. Also here are exemptions from military service, such as someone betrothed but not yet married.
The seventh aliyah contains further procedures for a war, specifically what and whom can be taken for spoil in a captured city. And here is mentioned that we are forbidden to cut down fruit trees when we attack a city, showing Judaism's respect for all creatures, and certainly all people. In this aliyah we find the words "For man is a tree of the field". (This is an allusion to the custom of not cutting the hair of a boy until he reaches the age of 3 years old, just as we do not eat the fruit of a newly planted tree until after the third year of its growth.)
This aliyah closes with the procedure for an unsolved murder. The procedure is carried out by the elders of the city closest to where the slain person was found.