Pinning in type II superconductors