Wipe the area surrounding the crack clean with a damp rag. Avoid using any solvents to clean the area, as this may damage the paint.
Open your small container of joint compound and mix if necessary. Most compounds arrive pre-mixed and ready for use, but some must be mixed with water prior to application.
Scoop up a generous amount of compound with your spackling knife. Spread the compound over the crack. Apply firm pressure as you spread to pack the crack completely full of compound.
Drag the blade of your spackling knife over the crack and surrounding area to smooth the compound. The compound should look flush with the wall around it. Allow it to cure for at least 24 hours, or for the time suggested on the container.
Sand the patch smooth with a sheet of fine grit sandpaper. Wipe away any sanding dust with a damp rag.
Apply the same textured paint over the patch using a brush or roller. To match the rest of the texture, your application method should be exactly the same as the one used to first apply the paint.
Allow the paint to dry for 24 hours, or for the time suggested on the container.