Teach the dog that being with you is better than anything else. You will need to be interesting. Offer alternative behaviour to the unacceptable ones. DO NOT use check chains or half checks, force, punishment, shouting, or smacking. Collies and small children together are a potential problem.
Toddlers are on the same eye level and stare.
This is a challenge to any dog, particularly a collie. Children make high-pitched noises and sudden movements which can trigger collies. The dog must not be allowed to run up and down with children. It will get more and more excited and start jumping up and pulling at clothes or try to herd the children by nipping. A collie must be kept occupied or it will go self-employed.