I'm a non-US citizen, not residing in US, i uses tdameritrade firm to trade US stocks Are my capital gains (short term and long term) and dividends subject to taxes?

I'm a non-US citizen, and not residing in US, who uses an online brokerage firm to trade US stocks ( TD Ameritrade Foreigner Cash Account ) . Are my capital gains (short term and long term) and dividends subject to taxes? If yes, what are those taxes? and how it can be paid on my case since i don't have an SSN or TIN number.

please tell me from where i start to finish this thing on the correct way