Physics and applications of the Josephson effect