The Herod mentioned in these verses is Herod Antipas, son of Herod the Great. As a tetrarch, he was subject only to the Roman emperor. He believed that Jesus was John the baptizer risen from the dead. Although Herod didn't originate this idea (cf. Luke 9:7-9), his guilty conscience led him to believe that it was true. There was a common idea among those of that era that departed spirits were given miraculous powers. Thus, Herod supposed that this "resurrected John" had brought these powers back with him (cf. John 10:41). Others believed that Jesus was a prophet of some sort (perhaps even "the Prophet," who would be like Moses; i.e., the Messiah). Others viewed Him as Elijah who had reappeared. Although Herod sought to see Jesus (Luke 9:9), he didn't get the opportunity to do so until Jesus' crucifixion (Luke 23:8). Jesus knew Herod was a treacherous man (cf. Luke 13:31,32) and avoided him.
Mark 6:17 records that Herod had John the baptizer arrested. It is difficult to calculate with certainty exactly how long John was in prison before he was beheaded. To thoroughly understand these verses, one must understand the relationships among all of the people involved. Herod the Great had many wives, and three of his sons were Aristobulus, Antipas (i.e., the Herod who arrested John), and Philip. These three sons of Herod the Great were all half-brothers to each other. Aristobulus had a daughter named Herodias who married Philip (her uncle). Antipas married King Aretas' daughter. According to the historian Josephus, Antipas visited Philip and repaid his hospitality by having an affair with his wife, Herodias. Antipas fell in love with Herodias and proposed marriage to her. She agreed but demanded that he divorce Aretas' daughter first. He did so and Herodias then divorced herself from Philip and married Antipas (who was also an uncle to her). Historically, it is recorded that Aretas became indignant at Antipas' treatment of his daughter and he waged war against him and defeated him. Many in that day regarded this as Antipas' punishment for the murder of John the baptizer. In 39 A.D., Antipas was banished to France and Herodias followed him. They both died in exile.
But, why exactly did Herod imprison John to begin with? Because he had clearly told the ruler - "It is not lawful for you to have your brother's wife" (Mark 6:18). John had dedication to truth and duty; Herod had his half-brother's wife (as if she were his own). Inevitably, there would be a verbal confrontation when the opportunity presented itself. Herod claimed to be a Jew and pretended to respect the law of Moses. However, that law condemned what he was practicing as adultery (cf. Exo. 20:14,17; Lev. 18:16; 20:21), and John could not just ignore such a sin in the life of this prominent authority.
We will continue studying this narrative in our next lesson.