Seung-Hui Cho was a South Korean national with permanent
resident status in the US, i.e., he was a 'green card' holder. Both
of his guns were purchased legally.
Citizens and permanent residents are allowed to purchase firearms
in the US.
Individuals purchasing firearms from licensed FFL dealers at gun
shows have to submit to a background check (the National Instant
Criminal Background Check System, or NICS for short) at the time of
the purchase. The checks are nearly instantaneous, and involve the
dealer calling the relevant state or federal NICS agency by
telephone with information about the purchaser. If the purchaser's
records come back clean, approval for the sale is given, usually
within minutes of the call being made.
In some states, holders of handgun carry permits are exempted from
these checks when purchasing a firearm, the rationale being that
the background checks had already been performed at the time of the
permit application.
Some states do not require a NICS check for private, in-state firearm
transactions.