Investors & landlords

Could someone please walk me over how to put in the 3000 loss limit and then track it for the next many years? Because I have about $40,000 capital losses.  And also, how does IRS track my losses for many years as I claim them?

Thanks,

Pooya