Infant is through age 7.
Can. 867 §1. Parents are obliged to take care that infants are baptized in the first few weeks; as soon as possible after the birth or even before it, they are to go to the pastor to request the sacrament for their child and to be prepared properly for it.
§2. An infant in danger of death is to be baptized without delay.
Can. 868 §1. For an infant to be baptized licitly:
1/ the parents or at least one of them or the person who legitimately takes their place must consent;
2/ there must be a founded hope that the infant will be brought up in the Catholic religion; if such hope is altogether lacking, the baptism is to be delayed according to the prescripts of particular law after the parents have been advised about the reason.
§2. An infant of Catholic parents or even of non-Catholic parents is baptized licitly in danger of death even against the will of the parents.
Age 8 and later:
Can. 865 §1. For an adult to be baptized, the person must have manifested the intention to receive baptism, have been instructed sufficiently about the truths of the faith and Christian obligations, and have been tested in the Christian life through the catechumenate. The adult is also to be urged to have sorrow for personal sins.
§2. An adult in danger of death can be baptized if, having some knowledge of the principal truths of the faith, the person has manifested in any way at all the intention to receive baptism and promises to observe the commandments of the Christian religion.
Can. 866 Unless there is a grave reason to the contrary, an adult who is baptized is to be confirmed immediately after baptism and is to participate in the eucharistic celebration also by receiving communion