Newbie DirectX question - .X files

Been looking at some sample DirectX 3d programs. They all use there .X
files for 3D objects. How are they made? Can I use .OBJ or .COB files?