Immigration Act 2009, s 79(1)(c)
As long as your Temporary Visa hasn’t expired, you can apply for another Temporary Visa of either the same or a different type (for examples, you can apply for a Work Visa if you currently have a Student Visa).
Immigration Act 2009, ss 18, 20
Once your visa has expired, you’re in New Zealand illegally and therefore you have no right to apply for a visa of any kind. You’ll have to leave the country, unless you can get a visa as a special case under section 61, or unless the Immigration and Protection Tribunal lets you stay on humanitarian grounds, see “If you’re here illegally: Understanding your options” in this chapter.