Atomic scale understanding of complex chemical processes at surfaces