Foreigners interested in buying U.S. stocks in companies don't pay any tax on the purchase, but they cannot deduct losses on that sale either. For the dividends, a flat 30% tax exists.
Although the estate tax exemption exists up to $60,000, anything over that amount is taxable for stocks in U.S. companies. This basically means that if you pass away with stocks worth over that amount, your beneficiaries or children could end owing the IRS some estate taxes.
The best thing to do is to buy stocks through a foreign company or corporation and through them, your stock is tax exempt.