if your gonna lace a wheel as well, you might want to have a bike shop do it.
basically you have a hub, sprocket and hardware and shifter.
if its a coaster brake, kind of see the arm. the small bolt and strap go on the arm. the sprocket goes on the other side, sometimes there is a ring, that is a dust cover then the sprocket, then a large c-clip gets snapped in.
Sometimes you need sprockets with more or less teeth to make the ratio of the gear work with the front sprocket correctly, otherwise your 3 speed is not working to help you.
If you have a rear wheel already you may be able to reuse the spokes, what wheel lacing videos on yooutube, get a spoke wrench, go to it.