Quantum field theory on curved spacetimes, the algebraic approach