What are the roles of officials in a basketball game?

As with officials in any game their purpose it to make sure the rules of the game are understood and followed by the players.