This means that the best time to teach your dog something new is when there are few distractions, for the dog and for you. Start a new behavior at home, when it's quiet, or in a familiar place that your dog is comfortable in. But when distractions show up, you need to lower your expectations, and maybe switch from "training" to "management" - merely controlling your dog and the situation as much as possible. If you cannot be pretty sure of your success, don't ask your dog to do something new or challenging.
This also means that you can't be training your dog when you're absent, asleep, or focused on work, a child, or a different leisure activity.