The hoop itself takes up minimal space, but you'll want to keep a few distances in mind as you plan its placement:
Free throw line: 15 feet in front of the hoop
High school 3-point line: 19 feet, 9 inches in a semi-circle around the hoop
NBA 3-point line: 23 feet, 9 inches in a semi-circle
Half court line: 47 feet in front of the hoop
You'll also need at least 5 feet behind the hoop for any loose balls and runway.