Install the top track by measuring the top jamb width and divide it in half. Hold the track up and mark for the screw holes. Take the track back down and drill in starter holes for the screws. This will make it easier to hold the track up and screw it in. Install the top track.
Install the bottom track if your door has one. (Not all doors have bottom tracks.) Use a plumb bob to find the exact spot on the floor to measure for the bottom track at both ends. Draw a line from one end to the other and install the bottom track along the line.
Install the door by placing the bottom pivot point into the into the lower track socket. Then put the top pivot point into the top track. It is most likely spring loaded, just pull it down and put it into place.
Put the sliding guides into the top and bottom track. Adjust the door, if needed, with the track sockets and the lower pivot pins. If you have two doors to your closet repeat on the other side.