Unzip the fabric pillow cover and remove the stuffing from inside the pillow. Doing this will make it easier to sew the button on properly.
Thread one needle with thread that matches the color of the button. You can also use a contrasting thread color if you want to create a different look. Tie a knot in the end of the thread. For larger buttons with bigger holes, double the thread back on itself so you are sewing with two strands.
Bring the needle up through the pillow fabric in the spot where you want the button to go. Push the needle back down through the fabric, making a small stitch. Repeat this by making a second stitch flush against the first stitch. Place the button centered over these two stitches.
Push the needle and thread up through the fabric and through one of the holes in the center of the two-sided button. Pull the needle down through any of the other holes in the button and through the fabric. Insert a second needle under the button, between the button surface and the thread loops you are creating as you sew. The inserted second needle will keep the button from being sewn too tightly onto the fabric.
Make three to four stitches through the pair of holes in the button. If the button has four holes, make three to four stitches through the second pair of holes too. Pull the second needle out from under the button. Wind the thread around the loops under the button three times.
Push the needle down through the fabric, under the button, and cut the thread leaving 4 inches loose. Tie a knot in the thread on the wrong side of the fabric so it secures the button and does not show through. Re-stuff the pillow.