To unlock D-Dog you have to make a few steps and the first one of them is to find a dog during the game. The best moment to do so is during the fourth main mission called C2W. Right after beginning of this mission look around the landing zone, where you shall be able to find a puppy. If you don't you may restart the mission or just try to look for him in while exploring the area. In the last case just look around and maybe you will also listen some barks. After finding a puppy get close to him and fulton him to the Mother Base.
Soon after fultoning the puppy away you are going to be invited by Ocelot to Mother Base and you are going to see a short cutscene. After that point you should focus on new missions. When getting close to the 9th or 10th mission you should receive another invitation. When you will get to Mother Base you will see D-Dog as a mature and trained dog which will be able to join you during the following missions.
Information about D-Dog and how to use its help
During most missions D-Dog is probably the most useful buddy you can take. His biggest advantage is the ability to detect the living creatures and important objects from large distance. It will help you to stay undetected if you try to sneak your way through an obstacle and you would like to save some time which you normally would have to spend on reconnaissance (or it is impossible to make it properly because of the shape of the surrounding area). It will also help you find the friendly or important characters such as the imprisoned allies. D-Dog will also locate objects like mines, medical plants or new animals which you may send to your zoo.
Developing your relation with D-Horse is possible by taking him on missions with you and giving him orders as well as by unlocking his new "equipment". At first D-Dog may obey some basic orders such as the barking which will draw your enemies' attention. Later on he will also be able to stun your enemies and do some other useful tricks, between which probably the most interesting one will be available after giving him a camouflage and a knife which will allow him to takedown your enemies. D-Dog is very efficient while if stays undetected and during one on one combat.