Tim Cook is stepping down as CEO of Apple — he will be replaced by John Ternus, the company's former chief technologist.