Viruses infect host cells by attaching to specific receptors on the cell surface. Once attached, the virus can enter the cell through various mechanisms, such as endocytosis or membrane fusion. Inside the host cell, the virus hijacks the cell's machinery to replicate its genetic material and produce new viral particles.