"Yet now, brethren, I know that you did it in ignorance, as did also your rulers. But those things which God foretold by the mouth of all His prophets, that the Christ would suffer, He has thus fulfilled. Repent therefore and be converted, that your sins may be blotted out, so that times of refreshing may come from the presence of the Lord, and that He may send Jesus Christ, who was preached to you before, whom heaven must receive until the times of restoration of all things which God has spoken by the mouth of all His holy prophets since the world began."
Although Peter used the word of God to convict his audience of sin, he did not stop there. He now proceeds to lovingly appeal to them regarding how they could be cleansed from their transgressions. He acknowledges that their actions were done in ignorance. To some degree, they did not recognize Jesus as the promised Messiah (although they should have!). It should be noted here, however, that even though their actions against Christ were done in ignorance, this did not make them innocent! Peter had already laid guilt at their feet for slaying Jesus. In principle, sins committed in ignorance will still condemn our souls (though God does take our level of knowledge into consideration; cf. Luke 12:47,48; Acts 17:30).
The suffering Christ experienced was predicted by the Old Testament prophets (cf. Luke 24:44-46; Isa. 53; Psa. 22; etc.). So, although the people behaved wickedly by choosing to crucify Christ, God knew such would take place and would indeed use it for great good; that is, making salvation possible!
Acts 3:19 is parallel to 2:38 in my estimation. Although different words are used, the same thought is being communicated. Both verses command repentance, which is a change in mindset or will (away from sin and toward righteousness). 3:19 requires them to "be converted" while 2:38 requires baptism. Thus, being converted must include being baptized in the name of Jesus. This is where the change in behavior begins. In both verses there is a two-fold result: remission of sins and the receiving of the Holy Spirit as a gift in 2:38 and the blotting out of sins and "times of refreshing...from the presence of the Lord" in 3:19. Of course, remitting sins and blotting them out are parallel thoughts for forgiveness. Furthermore, when comparing these two verses, it seems to be the case that receiving the gift of the Holy Spirit is the same as being refreshed from the very presence of the Lord. In other words, the Spirit is given as a gift, in a non-miraculous measure, to the obedient one (cf. 5:32). To have God dwelling within oneself is refreshing indeed (cf. I Cor. 6:19,20)! Forgiveness of sins and the indwelling of the Spirit only come after one has changed both his mindset and behavior.
In Acts 3:20, Peter mentions the second coming of Christ. Certainly this is another reason to repent and be converted! In addition to having one's sins cleansed and receiving the indwelling of the Spirit, one needs to be mindful of Jesus' return when He will judge all, rewarding and punishing accordingly (cf. II Cor. 5:10). We must always be ready for His return, for it could be at any time (cf. Matt. 25:36-44). But, until the time is right, Jesus must remain in heaven. Specifically, Peter said Jesus would remain in heaven "until the times of restoration of all things" (Acts 3:21). The idea here is that until all things are completed, Jesus will not return. When Peter spoke in the first century, there were still things to be fulfilled that had been predicted by the prophets. However, nearly 2000 years later, I am unaware of any Biblical prophecy that is yet to be fulfilled before the second coming of Christ. Yet, only God knows the proper time for Jesus to return in judgment. Evidently that time has not yet come since Jesus is still reigning in heaven presently. In the meantime, we on Earth must continue seeking to do His will, which includes laboring to redeem those who are lost in sin (as Peter endeavored to do here).