When in basketball do you earn a three pointer?

When you shoot from the three pointer line which is behind the foul line.