Electronic and magnetic properties of interfaces