Obedience to all law
D&C 1:32
D&C 84:61
Initially and primarily through a valid and authoritative baptism
Forgiveness of all others
D&C 64:8-11
Matthew 6:9-15
Luke :37
3 Ne 13:9-15
Luke 11:1-4
Forgiveness of Sin
Receiving forgiveness of my sins
Savior forgave sins through the agency of his servants the prophets
John 20:23
D&C 132:46-7
PROCESS
Restitution for sin
Confession of sin
Abandonment of sin
Godly sorrow for sin
Savior forgave sins specifically to individuals
D&C 82:1 the Lord forgives His servants after they have forgiven one another
D&C 61:2 to the elders of the church sins are now forgiven you
Enos 1:5 to Enos after wrestle with the Lord
D&C 64:3
Ether 2:15 to Brother of Jared and his brethren
Woman with issue of blood and many others that He healed; most of them probably had not yet been baptized by authority
D&C 60:7 your sins are forgiven you (as you lift up your voices declaring His word)
D&C 50:36
Subtopic
Joseph Smith in sacred grove
D&C 36:1
D&C 31:5
D&C 29:3
Matthew 9:2-8