We pray for the faithful departed, those who have been baptized, but who need to be completely purified of all stain of sin before they come into full union with God in Heaven. In other words, most of us. The Church's teaching about Purgatory, the place of purification, is explained in the Catechism of the Catholic Church (§1030-1032)
Here are a couple of prayers that can be said every night at bed time, or whenever you pray, for your deceased loved ones:
Heavenly Father, You sent Christ Jesus your Son to wash away the sins of all mankind through His perfect sacrifice,and you cleansed our departed brothers and sisters in the waters of baptism. May His perfect sacrifice free them from the power of death and give them eternal life. In your mercy, O Lord, grant them eternal rest, and may perpetual light shine on them forever. +
Eternal rest grant unto them, O Lord,and let perpetual light shine upon them.May they rest in peace.