When switch is closed current in circuit increases suddenly and hence flux in the loop increases in outward direction so clockwise current-pulse is induced.
When switch is opened current in circuit decreases suddenly and hence flux in the loop decreases in outward direction so anticlockwise current-pulse is induced.