What does Acts 8:16 mean?
Philip, one of the first deacons of the church, has fled to Samaria because of Saul's persecution of the church (Acts 6:1–6; 8:1–5). He has been performing miracles and preaching the gospel, and many have responded enthusiastically. Now, Peter and John have come from Jerusalem to see what Philip's been up to (Acts 8:6–8, 14–15).Verses 15, 16, and 17 of this chapter, when taken out of context, can lead to several false ideas about salvation and the Christian faith. This passage is not saying Jesus' name is some kind of magical word. To be "baptized in Jesus' name" means to publicly align oneself with Jesus' teaching—to accept Him as your Lord and Savior. It doesn't mean that you have to use the name Yeshua to have your prayers answered.
Nor is this section indicating people don't get the Holy Spirit until someone lays hands on them. This is a special circumstance; by waiting for Peter and John to arrive, the Holy Spirit validates the faith of the Samaritans to the apostles, and validates to the Samaritans that they are joining the official church that Jesus originated.
Nor does this passage say we should be baptized only in Jesus' name. Jesus gave clear instructions that Christ-followers should be baptized in the name of the Father, the Son, and the Holy Spirit (Matthew 28:19).
This situation is very similar to that of the baptism of John the Baptist. Many people received John's baptism because they accepted his message that they needed to repent of their sins. Jesus validated John's message by taking John's baptism, Himself (Matthew 3:13–17). But John's baptism didn't save (Acts 19:1–6). It prepared the people's hearts for Jesus' forgiveness (Matthew 3:11).
Philip's preaching isn't incomplete. Unlike the situation where Paul meets the men who have received John's baptism (Acts 19:1–6), Peter and John don't add anything to Philip's message. They merely lay their hands (Acts 8:17). When reading Acts, it's important to understand that some of the events and practices are things we should emulate, but others are special circumstances due to the extreme early stages of the spread of the gospel.