God speaks about consecrating every firstborn, and says that they belong to Him. What exactly do they have to do to a firstborn, and what does God mean?

Ted: Basically, "consecrate" means to "set apart" or to "sanctify" something. There are cases in the Bible where a child (I think, typically, the firstborn) is set apart to serve God--to work in the temple and spend his life in God's service. I don't know if there necessarily was a ritual or a ceremony commemorating this, I think it was more like the mom and/or dad would say that they were giving their child to God.

One example is in Samuel 1:1-28. Hannah, whose womb was closed, prayed that the Lord would give her a son, promising that she would give him to the Lord. Indeed, she conceived, and Samuel was born. He became one of Israel's greatest prophets and served God all the days of his life.