Geza Vermes has an interesting article of the career of Herod the (so-called) Great in Standpoint (UK). Herod was a "player" in the realpolick of the times. He was dealt a weak hand, compared to his neighbors, but, nevertheless, wound up outlasting most of his enemies.
He became the Judean king, in the first place, by cleverly switching sides. In the first phase of the Roman Civil War, Herod moved from the anti-Caesar faction, which lost, to the pro-Caesar faction, which won. In return, Mark Antony persauded his ally, Octavian, that Herod would be their man in Judea.
When Octavian and Antony had their inevitable falling out, Herod sided with Antony. This part of the Roman Civil War was largely a struggle between east and west. The eastern part of the Empire supported Antony, the west Octavian. Herod was in the east, owed his career to Mark Antony, and loyally supported Antony with food, money, and troops.
The other aspect of the war, where Herod was at a disadvantage, was that the Roman Civil War was also largely between Italy and Egypt. Italy supported Octavian. Cleopatra of Egypt financed Antony, and supplied massive amounts of food for Antony's army. If Herod was a staunch ally, Cleopatra was an essential one. In return, Antony gave Cleopatra some of Herod's most important properties--all the ports along the Meditteranean, except for two, plus profitable balsam groves and bitumen mines.
Antony and Cleopatra, however, unwittingly did Herod a huge favor which may well have saved his life. Cleopatra visited Herod in 34 BC. Josephus claims she tried to seduce Herod during this visit, but modern scholarship has questioned this view. For one thing, it would have been monumentally stupid on Cleopatra's part, and Cleopatra was not a stupid woman. Another reason is that Cleopatra was quite commonly seen as an exotic seductress, even though this is less true than is commonly thought.
Yet another reason she would not is that Cleopatra was friends with Herod's two most powerful enemies in Jerusalem--his own wife, Mariamne, who never quite got over her husband killing her grandfather, and his mother-in-law, Alexandra, who plotted twice to have Herod killed.
Herod supposedly gave some thought to assassinating Cleopatra while she was in Jerusalem, but thought better of that idea as well when it occurred to him that this would involve him losing his own head at the hands of Mark Antony.
What redounded to Herod's benefit was that Cleopatra was after the land of the Nabateans, and persauded Antony to get Herod to go after those lands for her. This probably infuriated Herod at the time, but it allowed him to escape being present at the Battle of Actium, 31 BC, in which Mark Antony and Cleopatra were soundly defeated by Octavian.
Herod went to see Octavian, uninvited, after the battle. He admitted that he had indeed supplied Antony with money and food, and to being Antony's friend. After Actium, Herod told Octavian that he had counseled Antony to get rid of Cleopatra, the cause of all the problem, according to Herod. He did also make sly mention that he had not fought against Octavian at Actium. This, according to Josephus, was Herod's final remark:
I am come to rest my safety on my integrity...I am not ashamed to declare my loyalty to Antony. But if you would disregard the individual concerned, and examine how I requite my benefactors, and how staunch a friend I prove, then you may know me by the test of my past actions. I hope that the subject of inquiry will be not whose friend, but how loyal a friend, I have been.
Octavian was impressed and let Herod keep his job, which is how Herod was still the king at the time of the birth of Jesus. His son, Antipas, would play a role in Jesus' crucifixion.
On the one hand, Herod was a talented politician and, one must admit, a spectacular builder. The harbor at Caesarea Maritima was state-of-the-art, and Herod's Temple--the Temple at the time of Jesus--was a true wonder. Some considered it the most beautiful building in the world. In order to get the support of the religious establishment to build it, Herod bribed them with fancy clothes. Says Vermes:
To allay religious worries, he associated the Jewish clergy with the project, and to please them he ordered sumptuous robes for 1,000 priests. The main sanctuary, completed in 18 months, was inaugurated in a grandiose ceremony entailing the sacrifice of 300 oxen. The Temple was one of the marvels of the ancient world. According to a Jewish saying, "He who has not seen the Temple of Herod, has not seen a beautiful building in his life." Work continued long after Herod's death and did not end until the procuratorship of Albinus in 62-64 CE, a few years before its destruction in the first rebellion against Rome in 70 CE.
On the other hand, Herod was a thug and a murderer, hated by his people. This is the side of Herod we see in Matthew's gospel, in particular. Herod wound up assassinating Mariamne and Alexandra, as well as two of his sons, and many thousands of others besides. He arranged for a mass murder to take place in Jerusalem upon his death on the grounds that he knew nobody would mourn him, but at least there would be mourners in Jerusalem when he died. The order was not carried out.