Measure the height and width of your closet's doorway using a measuring tape. Multiply the width by two and add 5 inches to the height.
Cut a rectangle of fabric that matches the dimensions you have come up with.
Hem one short side and two long sides of the rectangle by turning the fabric down twice toward the wrong side, creating folds that are 1/2 inch deep both times, and sewing the folds in place. The task goes much more quickly with a sewing machine, but if you don't own one, stitching by hand is perfectly fine.
Fold the unfinished edge down 4 inches toward the wrong side of the fabric, and stitch it flat 1/4 inch up from the end of the folded-over piece, creating a tube.
String the curtain onto a tension rod that's just wider than the width of your closet. Tension rods have a spring and will compress a little so you can put the rod and curtain in place. The rods are sold in varying thicknesses, from a quarter- or half-inch across to as thick as shower curtain rods.
Mount the tension rod at the top of the closet's doorway. Pressure holds the rod in place.