Peter here declared that the promise (of forgiveness and the gift of the Holy Spirit) was available to all classes of people who meet God's conditions. And, as we have seen in this context, those who hear the gospel, believe it, repent of their sins, and are immersed in water for the forgiveness of sins also receive the gift of the Holy Spirit (which is the Holy Spirit Himself dwelling in them in a non-miraculous measure). Peter was specifically speaking to the Jews ("you"), the descendants of the nation of Israel ("your children"), and the Gentiles ("all who are afar off"; cf. Eph. 2:11ff). In other words, the promise is available to any human being who is willing to respond obediently to God's call He has extended through the gospel of Christ (cf. II Thess. 2:14).
"And with many other words he testified and exhorted them, saying, 'Be saved from this perverse generation.' Then those who gladly received his word were baptized; and that day about three thousand souls were added to them. And they continued steadfastly in the apostles' doctrine and fellowship, in the breaking of bread, and in prayers" (Acts 2:40-42).
Luke tells us that Peter had much more to say than what is recorded here. His words bore witness of Jesus Christ and he urged the people to save themselves. Clearly, man must do something if he is to be saved (cf. Phil. 2:12). It is certainly true that no one can be saved without the love, mercy, and grace of God (cf. Eph. 2:4,5), but such does not eliminate our responsibility to obey the Savior if we are to be saved (cf. Heb. 5:8,9).
Some of those present did desire to be saved from their sins, and, because they had good hearts that were open to the truth Peter preached, they were willing to repent and be baptized as they had been instructed. Those who were unwilling to receive the word of God refused to repent and be baptized (cf. Luke 7:30; tragically, some today are also unwilling to obey). In all, about 3000 people joyfully obeyed the gospel on that day of Pentecost. They received the indwelling of the Holy Spirit and had their sins remitted.
But, this was just the beginning in two ways. First, there would soon be many more who, in like manner, would be saved from the destiny of a wicked world. Second, those who were baptized into Christ were beginning a new life with the Lord (cf. II Cor. 5:17). Their obedience did not end as they came up out of the water! Specifically, these babes in Christ had a lot of spiritual development ahead of them along with many good works the Lord had prepared for them to do (cf. Eph. 2:10).
Luke tells us that these new Christians "continued steadfastly" in four areas: the apostles' doctrine, fellowship, the breaking of bread, and prayers. Their continued diligence in these areas underscores the importance of each (for them as well as for us today). We too must stay within the parameters of the apostles' doctrine (i.e., the teachings from God revealed through the apostles; cf. Matt. 28:20). If we are to please God, we must have New Testament authority for that which we say and do (cf. Col. 3:17). It is when we stray from the word of God and allow our opinions and preferences to guide us that we will stumble. We too should pursue fellowship in Christ (i.e., sharing or participation with). As we will see throughout the book of Acts, early Christians were a united, close-knit community of individuals who actively participated in the common privileges and obligations of the Christian life. Their hearts were knit together in love (cf. Col. 2:2), and it showed! We too should continue faithfully in the breaking of the bread (do not overlook the articles used here in the Greek). This seems to be a reference to the Lord's Supper memorial which the early Christian partook of weekly (cf. Acts 20:7; I Cor. 10:16; 11:23ff). We too must be constant in prayers. We must petition the Lord, praise Him, confess our faults, and thank Him regularly. If we today continue steadfastly in these areas as the early church did, it is certainly true that the Lord will bless us and accomplish great things through us as He did through them!