First, spy a baby.
Second, be sure that the object you spied is indeed a baby by employing classic sniffing techniques. If you smell baby powder and the wonderful aroma of wet diapers this is indeed a baby.
Next you will need to flatten the baby before actually beginning the hugging process.
** Note: The added slobber should help in future steps by making the 'paw slide' easier.
The paw slide -- simply slide paws around baby and prepare for possible close-up:
Finally, if a camera is present, you will need to execute the difficult and patented 'hug, smile and lean' so as to achieve the best photo quality: