Two ways to get it:
A player makes a 3 pointer and gets fouled. The player misses the free throw, rebounds it, and tips it in for 2 points. This is the more "traditional" 5 point play by a single player.
A player makes a 3 pointer and gets fouled. A technical is called on the fouling team - usually for complaining against the call. The player hits the foul free throw and the technical free throw. This is the "non-traditional" 5 point play by a single player. Happens very rarely.