To achieve a green in regulation, your golf ball must be on the putting surface in the expected number of strokes in relation to par. The par for a hole always includes two putts, so to achieve a GIR on a par-3, you must reach the green with your first shot (on the green in one, two putts for par). On a par-4, you must reach in two shots (on the green in two, two putts for par). On a par-5, you must reach the green in three shots.
To claim a GIR, your ball must be on the putting surface. Being 1-inch off the green, in the fringe, but still able to putt the ball does not count. The ball must be on the putting surface.