See https://www.irs.gov/businesses/small-businesses-self-employed/independent-contractor-self-employed-o...
and
https://www.irs.gov/taxtopics/tc762