Funds from my IRA will be reinvested in the market

This is my first year I'll need to take my RMD from my IRA.  Some of that money will be reinvested in the market. I'll open a separate account for these funds.  How are the gains or losses tracked and reported to the IRS?  If there are dividends earned but not withdrawn how are they taxed and reported?  

 

Thanks