Replacing a spoke is easy. It’s often getting hold of the right length that’s the hard part!
First off, you need to buy a replacement spoke. Most local bike shops will stock a variety of lengths, so they're your best bet if you're unsure. If you know what length you need already, you'll undoubtedly know where to get them from.
With the spoke laced through the others, and in the right place, start threading the nipple on to it from the other side of the rim.