Baby dedications are done when a believing family has a new child and wants to publicly declare that the child belongs first to God, and to themselves second. This means that they are promising to raise the child up in the ways of the Lord and do everything they can to help that child know how to walk with God.
The example typically used for this is with Hannah and her son Samuel found in 1st Samuel chapter 1. Hannah is barren and cannot have a child, but after telling God that if He gives her a child she will dedicate him to Gods service. Gods blesses her and gives her a child. She amazingly follow through on her promise and gives the child to Eli who was leading Israel at that time, to be raised as a servant of God in the house of God.
Today, we do not drop off our children at the church to be raised by the pastor, but the principle remains the same. We acknowledge that our children are a blessing from God, given to us by his grace, and therefore they ultimately belong to God first before they belong to us. We are promising, like Hannah, to raise the child in the fear and admonishion of the Lord, and to train them to live for God and be used in His Kingdom.
It is not required for believing families to do this, and is not any means to salvation for the child. It is, though, a special time for the family as they dedicate their child to God. It is also a time for the whole church body to pray for God’s favor and protection that individual child.