How does a team get a supplemental first rounder? second rounder?

Also, how does a team get another teams first rounder? I know it has something to do with free agents but I didn't know the specifics. Thanks in advance.