AllFocus automatically shoots at several distances and merges the photos. Knowing these few basics explains why it works the way it does, and helps you find the way of shooting that suits you.
These are the basic principles. The best way to shoot depends on you and on the subject — try a few times and you will find your own way.