Atomistic processes of surface and interface formation