It's not that hard.
There are a number of ways you can do it. Personally, I like piping on all my cushions so it's not practical to have a zip along an edge seam, so I put mine about 3/4 of the way down the back side with a flap of fabric over it so that it is covered.
You do need a zipper foot, ideally, it allows you to get closer to the zip teeth when sewing so you don't have an unsightly zip fabric dge showing.
I sew my zip into my back pannel of fabric before assembling and sewing the cushion.
What I do it have two bits of fabric, in total measureing 2 inches longer than the front panel of fabric. I sew one piece of thsi fabric to one edge of the zip, right sides together, then sew the other edge of the zip to the other piece of fabric, right sides together. Then I press and topstitch. Then I fold over the fabric from the top panel to completely cover the zip and press and topstitch on place so the zip is covered by a fold of fabric.
Then I make sure the two peices sewn together with the zip closed are the same size as the front panel of fabric. I the open the zip, put the front and back pieces of cushion togehter (right sides facing) add the piping and pin all around. Then I sew around all the edges, zigzag and trim the seams, turn the cushion cover right side out through the zip opening, and viola, you have a lovely cushion cover with a hidden zip.