What happens when a taxpayer generates both passive income and losses?

for homework prob, im stuck with a solution.sounds simple but i spent like an hour trying to find an answer.
what happens when a taxpayer generates both passive income and losses ?