The various mechanisms used by viruses to replicate their genomes inside host cells, such as the lytic and lysogenic cycles.