To attach one fence rail on top of another, you can
Place the fence rails, one under the other, and use a drill to insert screws to hold them in place
Place the fence rails, one next to the other, and use a drill to insert screws to hold them in place