The Gift of the Holy Ghost is a gospel ordinance received right after baptism, by the laying on of hands. This gift can be with us always if we keep the commandments. Through the baptism by fire, which comes from the Gift of the Holy Ghost, we can continue to be cleansed from our sins.
Received After Baptism:
After a person is baptized by immersion, by someone with authority, they are confirmed (made) a member of The Church of Jesus Christ of Latter-day Saints and receive the Gift of the Holy Ghost. The confirmation, and ordinance of receiving the Gift of the Holy Ghost, is often done during sacrament meeting on the following Sunday after a person has been baptized.
Laying on of Hands:
The Gift of the Holy Ghost (and confirmation) is given by the laying on of hands. This means that two or more brethren with the authority of the Melchizedek priesthood place their hands upon the head of the person receiving this ordinance. They say a blessing (a prayer) and grant them the Gift of the Holy Ghost. In the prayer the person speaking also gives the person a blessing by saying those things they are prompted to say by the Holy Ghost.
Be With Us Always:
If we keep God's commandments we will be worthy to feel the guidance of the Holy Ghost, which means we can have this gift with us almost all the time. This is often called the constant companionship of the Holy Ghost and is a great gift from our Heavenly Father.
Baptism by Fire:
Receiving the gift of the Holy Ghost is sometimes called the baptism of fire. "For the gate by which ye should enter is repentance and baptism by water; and then cometh a remission of your sins by fire and by the Holy Ghost" (2 Nephi 31:17.) This "fire" from the gift of the Holy Ghost cleanses us from our sins when we repent and is what purifies and sanctifies us.