This would be a very long answer but long story short is that they have connections, connections I don't have. It's not like they go to the super market no problem, esp cause it'd be tracked to them. Depending on the state it's easier, like if you live in alabama for example.
The National Gang Threat Assessment Report (2011: 43) goes on to state:
"Gang members acquire firearms through a variety of means, including illegal purchases; straw purchases through surrogates or middle-men; thefts from individuals, vehicles, residences and commercial establishments; theft from law enforcement and military officials, from gang members with connections to military sources of supply, and from other gangs, according to multiple law enforcement and NGIC reporting … Gang members are becoming more sophisticated and methodical in their methods of acquiring and purchasing firearms. Gang members often acquire their firearms through theft or through a middleman, often making a weapons trace more difficult … Enlisted military personnel are also being utilized by gang members as a ready source for weapons."