Sorry if this is super noobish, but I was wondering how taxes are handled if you are not considered a trader by the IRS?

Do they tax every gain you obtain? Meaning every transaction - entry to exit - that generates a profit? Or is it based on overall account value at the end of the year?