An NBA game consists of four 12 minute quarters, for a total of 48 minutes, while an NCAA game consists of two 20 minute halves, for a total of 40 minutes. The duration of a basketball game depends on the league.
On top of regular playing time, there are also breaks between halves or quarters. The time in each period is also paused during certain breaks in play, like fouls, injuries or time outs. Professional teams often have mascots, cheerleaders or other entertainment on the court during scheduled breaks to entertain fans. The average NBA game takes over 2 hours to complete.