We use computational modeling to study within-host viral infection and evolution. In our model, viruses exhibit variable binding to cells, with better infection and replication countered by a stronger immune response and a high rate of mutation. By varying host conditions (permissivity to viral entry T and immune clearance intensity A) for large numbers of cells and viruses, we study the dynamics of how viral populations evolve from initial infection to steady state and obtain a phase diagram of the range of cell and viral responses. We find three distinct replicative strategies corresponding to three physiological classes of viral infections: acute, chronic, and opportunistic. We show similarities between our findings and the behavior of real viral infections such as common flu, hepatitis, and SARS-CoV-2019. The phases associated with the three strategies are separated by a phase transition of primarily first order, in addition to a crossover region. Our simulations also reveal a wide range of physical phenomena, including metastable states, periodicity, and glassy dynamics. Lastly, our results suggest that the resolution of acute viral disease in patients whose immunity cannot be boosted can only be achieved by significant inhibition of viral infection and replication.