While DNA passes from parent to child, each child only gets half of each of their individual parent’s DNA. Consequently, as a lineage is worked back in time, there will be ancestors in your genealogical tree with whom you might not share any DNA. It doesn’t mean that the ancestor is not your ancestor. It simply means that their DNA did not makes it’s way all the way down to you. While DNA is microscopically small, there’s only so much your body needs.
Some suggest (for example, Blaine Bettinger in his The Family Tree Guide to DNA Testing and Genetic Genealogy) that once a lineage is traced back to the 4th great-grandparents that there are paper genealogy tree ancestors with whom you do not share DNA. That’s why you may share no DNA with another descendant of one of your 5th great-grandparents.
Of course there have to be ancestors in your tree with whom you do share DNA.