The New Testament describes John the Baptist performing baptisms of repentance in the Jordan River. These baptisms were for the forgiveness of sins and were a preparation for the coming of the Messiah.
Jesus himself was baptized by John the Baptist, though not for the same reason as others. Jesus didn't need forgiveness of sins, but his baptism was seen as an affirmation of John's ministry and an identification with humanity.
Christian baptism, however, is distinct from John's baptism. Christian baptism is performed in the name of the Father, the Son, and the Holy Spirit. It symbolizes a believer's identification with Christ's death, burial, and resurrection, as well as a cleansing from sin and a new life in Christ.
The New Testament emphasizes the importance of baptism as an act of obedience and a public declaration of faith in Jesus Christ. It is seen as an outward sign of an inward reality, namely, the believer's union with Christ.
While the New Testament strongly encourages baptism, there is not a consensus among all Christians as to whether it is absolutely necessary for salvation. Some believe that baptism is essential for salvation, while others believe that it is an important act of obedience but not a requirement for salvation.
Different Christian denominations have varying views on the necessity and mode of baptism. Some denominations practice infant baptism, while others practice believer's baptism (baptism after a person has made a conscious decision to follow Christ). The method of baptism also varies, with some denominations practicing immersion, while others practice pouring or sprinkling.
Ultimately, the decision of whether or not to be baptized is a personal one that should be made in consultation with one's conscience, understanding of scripture, and church leaders.