Magnetic vortices and pinning in thin films and superlattices