While you can buy doors intended for installing barn doors (Home Hardware and Home Depot have lightweight K and Z doors), just about any door can be converted into a barn door with special rails and hangers. Barn doors are usually taller and wider than a regular door to cover part of the door frame. To recreate this with your existing door, you should add some extra wood for the width and height. First place 2 x 2 on all the edges of the door and glue them together with wood glue and screws.
Then add additional 1 x 2 boards with wood glue and nails to give a little more width and height, but also to get a nice, clean edge. If you're not looking for an old, worn out barn door, then you can buy a door slab (frameless and without the drilled holes for the knob). The size you buy should be the size of the opening PLUS the housing on each side. I want a sliding barn door to cover the entrance to the hallway, my contractor wants to use a regular door but hang it on sliding hardware.
This will depend on the hardware and the thickness of the door, but you'll usually add 1 to 2 inches to the thickness of the door. To use a hinged door as a sliding barn door, you'll need to remove the door and repair the cuts in the hinges. If you change the color of the door, paint the original door as well, on the front and back, before placing the wooden strips.