Subduction occurs in the North Island because the Pacific Plate moves rougly orthogonal to the boundary with the Australian Plate and is denser than than the crust around New Zealand; the Pacific Plate is composed mainly of basalt, while New Zealand is an amalgamation of different sedimentary and volcanic rocks. As the Pacific Plate is subducted is bends and breaks, causing earthquakes. It also melts, causing volcanoes. Notice how the depth of earthquakes in the North Island gets deeper to the west - this is due to the continued westward movement of the Pacific Plate even as it subducts under the Australia Plate.
Over most of the South Island the Pacific Plate moves roughly parallel to the boundary of the Australia Plate. The Southern Alps are caused by slight obduction (up and over movement) of the Pacific Plate over the Australia Plate.
To the south of the South Island the polarity of subduction is reversed, with the Australian Plate being subducted beneath the Pacific Plate (e.g. Randall, 2007).
This post is a huge simplification of the tectonics of NZ. The geology of this continental fragment is very complicated, but also very interesting! Have a look at this video to see how the plate boundary has changed over time.