This is achieved by having the computer switch rapidly between running each program in turn.