Branch is the part that grows out from the trunk. A branch becomes a stick the moment it is no longer part of the tree.
Twig is a slender woody shoot growing from a branch or stem of a tree or shrub. A twig is smaller than a branch because a twig is found on a branch.
Log is part of the trunk or a large branch of a tree that has fallen or been cut off. If the branch is trimmed and cut up for firewood, it can be called a log if it's big enough in diameter.