There are several different kinds of phagocytes in the immune system including macrophages, dendritic cells, neutrophils, and others. All are capable of ingesting viruses, bacteria, some parasites, cell debris, and even intact whole cells. They differ in how those materials are then processed and displayed on the cell's surface, and how the cell responds to the phagocytic event, but that is beyond the scope of this question.
Phagocytes recognize pathogens via pattern recognition receptors (PRRs) for pathogen-associated molecular patterns (PAMPs). These PAMPs are patterns or motifs that are conserved within particular types of microbes. Examples include lipopolysaccharide (LPS) in Gram-negative bacteria such as E. coli, lipoteichoic acid from Gram-positive bacteria, double-stranded RNA (dsRNA) from certain types of viruses, etc.
PRRs exist in many different organisms in different kingdoms, including the fruit fly Drosophila melanogaster and plants like Arabidopsis thaliana, also known as thale cress. They have existed in humans (and many of our ancestors) since we evolved. The exact same PRRs that you and I have in our bodies were in the bodies of humans that lived 2,000, 20,000, and 200,000 years ago. Their genetic sequences may have changed very slightly over that time, but from a functional perspective they are the same. The reason for this is that (pathogenic) microbes have had the same PAMPs for millions and millions of years. PRRs are also not sequence-specific, instead recognizing molecular patterns - the chemical "shape" of a molecule. These patterns are evolutionarily conserved, meaning they are the same in species after species and remain essentially the same over long periods of evolutionary time.
Orthomyxoviruses are a viral family from which originate the viruses that cause influenza in humans and animals. These viruses have several different PAMPs in their structure and genome that allow phagocytes to recognize and destroy free virus particles as well as infected cells. These PAMPs are conserved between the different Influenza A viruses that can cause human pandemics. However, while these PAMPs are recognized by phagocytes (part of the innate immune system), which then go on to activate the rest of the immune system to fight the infection, this activation period can sometimes take up to two weeks or more. Therefore, flu vaccines focus on teaching a different part of the immune system (called the adaptive immune system) to recognize influenza infection via antibodies and patrolling memory cells, which can respond much more quickly than the innate immune system can. The reason you need a flu shot every year is because the exact molecular components of the influenza virus can change quite quickly, meaning you need to develop new antibodies and memory cells to recognize it quickly. The PAMPs do not change from year to year.
In response to comments:
As I mentioned, one of the main viral PAMPs is double-stranded RNA, which is produced (or released) inside the infected cell by most (but not all) viruses. PAMPs are typically vital parts of the organism - LPS in Gram(-) and lipoteichoic acid in Gram(+) bacteria are integral parts of their cell walls, dsRNA is part of the viral replication cycle - and can't just be evolved away. That is likely a reason why PRRs evolved in the first place - PAMPs generally don't change much over time.
I should also clarify: 20,000 years is a very short period in evolutionary time. As an example, the last common ancestor to chimps and humans lived between 4 and 13 million years ago. While new viruses have emerged as human pathogens in the past 20,000 years (heck, the last 3 years), the families they belong to and even some of those viruses themselves are not new, and possess similar PAMPs that have existed for millions of years, which has allowed specific PRRs to evolve and remain relevant today..
Another part of the story, which perhaps isn't clear from my original text, is that phagocytosis doesn't just involve PAMPs. Sometimes the target cell recognizes that it is infected and produces various "kill me!" signals that are expressed at the surface of the cell, targeting the immune system to destroy it. Additionally, if the body has seen that type of pathogen before either from previous infection or immunization (or both), memory cells that produce antibodies will likely be present. These antibodies will bind to their targets and can induce phagocytic cells to engulf them, whether they be free virus particles, other microorganisms, or infected cells. So, in some cases, phagocytosis can occur completely independently of PRRs and PAMPs.
On the subject of malicious bioengineering to remove PAMPs to create "super pathogens" - hopefully you'll see from above that most if not all PAMPs can't just be casually removed from an existing species the way we can cut and paste individual genes from plasmids. So, any potential super-virus will likely still have dsRNA that can be recognized by PRRs. But, because the innate immune system (of which PRRs are a part) takes some time to get the adaptive immune system geared up in the absence of strong pre-existing immunity, viruses can often infect, replicate, and begin spreading before the body can completely eliminate them.