There are different ways to answer this question.
If we look at HIV infections* by transmission category, we see that gay, bisexual, and other men who have sex with men are most at risk. In 2014, gay and bisexual men accounted for 70% of all new HIV infections. In the same year, individuals infected through heterosexual sex made up 23% of all new HIV infections.
* HIV infections indicate the estimated number of new infections in a given time period, regardless of when those infections were diagnosed.
HIV diagnoses refer to the number of people diagnosed with HIV infection during a given time period, not when the people were infected.
If we look at HIV diagnoses by race and ethnicity, we see that African Americans are most affected by HIV. In 2015, African Americans made up only 12%* of the US population but had 45% of all new HIV diagnoses. Additionally, Hispanic/Latinos** are also strongly affected. They made up 18% of the US population but had 24% of all new HIV diagnoses.

The most affected subpopulation is African American gay and bisexual men.
Subpopulations representing 2% or less of HIV diagnoses are not reflected in this chart.
MSM = men who have sex with men (male-to-male sexual contact)
There are also variations by age. Young people aged 13-24 are especially affected by HIV. In 2015, they comprised 16% of the US population but accounted for 22% of all new HIV diagnoses. All young people are not equally at risk, however. Young gay and bisexual men accounted for 84% of all new HIV diagnoses in people aged 13-24 in 2015, and young, African American gay and bisexual men are even more severely affected.
CDC’s fact sheets explain the impact of HIV on various populations in the United States.