Karen's transformation into a computer is never fully explained in the show. However, it is presumed that Plankton created her as a sentient computer program to help him with his plans to steal the Krabby Patty secret formula.