Paul said he received instructions for the ordinances directly from Jesus Christ:
2 Now I praise you, brethren, that ye remember me in all things, and keep the ordinances as I delivered them to you.
23 For I have received of the Lord that which also I delivered unto you. (1 Corinthians 11:2)
Unfortunately those instructions became lost, and all that remains are its rude reflections. Thankfully, they are found in the Book of Mormon as Jesus gave them:
1. By Water
a. Both Were Buried
12 And now it came to pass that Alma took Helam, he being one of the first, and went and stood forth in the water, and cried, saying: O Lord, pour out thy Spirit upon thy servant, that he may do this work with holiness of heart.
13 And when he had said these words, the Spirit of the Lord was upon him, and he said: Helam, I baptize thee, having authority from the Almighty God, as a testimony that ye have entered into a covenant to serve him until you are dead as to the mortal body; and may the Spirit of the Lord be poured out upon you; and may he grant unto you eternal life, through the redemption of Christ, whom he has prepared from the foundation of the world.
14 And after Alma had said these words, both Alma and Helam were buried in the water; and they arose and came forth out of the water rejoicing, being filled with the Spirit.
15 And again, Alma took another, and went forth a second time into the water, and baptized him according to the first, only he did not bury himself again in the water.
16 And after this manner he did baptize every one that went forth to the place of Mormon; and they were in number about two hundred and four souls; yea, and they were baptized in the waters of Mormon, and were filled with the grace of God. (Mosiah 18)
b. Belong to the Church of God
18 Therefore, Alma did go forth into the water and did baptize them; yea, he did baptize them after the manner he did his brethren in the waters of Mormon; yea, and as many as he did baptize did belong to the church of God; and this because of their belief on the words of Alma . (Mosiah 25)
c. Priests and Teachers Were to Baptize
13 And Alma established a church in the land of Sidom, and consecrated priests and teachers in the land, to baptize unto the Lord whosoever were desirous to be baptized . ( Alma 15)
d. Method and Power
21 And the Lord said unto him: I give unto you power that ye shall baptize this people when I am again ascended into heaven.
22 And again the Lord called others, and said unto them likewise; and he gave unto them power to baptize. And he said unto them: On this wise shall ye baptize; and there shall be no disputations among you.
23 Verily I say unto you, that whoso repenteth of his sins through your words, and desireth to be baptized in my name, on this wise shall ye baptize them—Behold, ye shall go down and stand in the water, and in my name shall ye baptize them.
24 And now behold, these are the words which ye shall say, calling them by name, saying:
25 Having authority given me of Jesus Christ, I baptize you in the name of the Father, and of the Son, and of the Holy Ghost. Amen.
26 And then shall ye immerse them in the water, and come forth again out of the water.
27 And after this manner shall ye baptize in my name; for behold, verily I say unto you, that the Father, and the Son, and the Holy Ghost are one; and I am in the Father, and the Father in me, and the Father and I are one.
28 And according as I have commanded you thus shall ye baptize. And there shall be no disputations among you, as there have hitherto been; neither shall there be disputations among you concerning the points of my doctrine, as there have hitherto been. (3 Nephi 11)
e. Children Don’t Need
9 And after this manner did the Holy Ghost manifest the word of God unto me; wherefore, my beloved son, I know that it is solemn mockery before God, that ye should baptize little children.
10 Behold I say unto you that this thing shall ye teach—repentance and baptism unto those who are accountable and capable of committing sin; yea, teach parents that they must repent and be baptized, and humble themselves as their little children, and they shall all be saved with their little children.
11 And their little children need no repentance, neither baptism. Behold, baptism is unto repentance to the fulfilling the commandments unto the remission of sins.
12 But little children are alive in Christ, even from the foundation of the world; if not so, God is a partial God, and also a changeable God, and a respecter to persons; for how many little children have died without baptism!
13 Wherefore, if little children could not be saved without baptism, these must have gone to an endless hell.
14 Behold I say unto you, that he that supposeth that little children need baptism is in the gall of bitterness and in the bonds of iniquity; for he hath neither faith, hope, nor charity; wherefore, should he be cut off while in the thought, he must go down to hell.
15 For awful is the wickedness to suppose that God saveth one child because of baptism, and the other must perish because he hath no baptism.
16 Wo be unto them that shall pervert the ways of the Lord after this manner, for they shall perish except they repent. Behold, I speak with boldness, having authority from God; and I fear not what man can do; for perfect love casteth out all fear. ( Moroni 8:9-16.)
2. By Fire and the Holy Ghost
20 And ye shall offer for a sacrifice unto me a broken heart and a contrite spirit. And whoso cometh unto me with a broken heart and a contrite spirit, him will I baptize with fire and with the Holy Ghost , even as the Lamanites, because of their faith in me at the time of their conversion, were baptized with fire and with the Holy Ghost, and they knew it not. (3 Nephi 9)