Dogs catch the flu from a virus like us humans catch the flu virus. Though the flu virus that humans get and the flu virus that dogs get are different viruses and only dogs can catch the dog flu and humans can't catch the flu from the dog.
And the dog can't catch the flu from humans.