How can you stop your dog from following you?

yelling at the dog