Acts 8 includes some adventures of Philip, one of the deacons chosen in chapter 6.
The church has scattered into Judea and Samaria, except for the apostles. The combined lands of Judea and Samaria correspond to the promised land from the exodus story told in Exodus through Joshua.
Philip, in verses 4-24, preaches in Samaria, with many people deciding to follow Jesus, including Simon, known as a sorcerer or magician. Word reaches the apostles in Jerusalem and they decide to send Peter and John, because even though many people have been baptized into Jesus, the Holy Spirit has not come to them. Peter and John lay hands on the new followers who then receive the Holy Spirit. No explanation is given to explain how they can tell when the Holy Spirit comes. Simon sees what happens and offers to buy the ability to bestow the Holy Spirit through the laying on of hands. Peter, in his normal forceful manner, tells him that this ability is not for sale.
Those who comment about Simon in this story usually cite him as a bad example in trying to buy an ability that God gives. I see in verse 24 that Simon accepts Peter’s rebuke, repents, and then promises to do better, a much more positive example.