usually used to describe when one has lost all patience for a situation or person.
an exaggerated hand movement is commonly used alongside this expression; the person raises their hand above their head flat and parallel to the ground to show where "up to here" is.
Jim: Hey, Tom. How's life going?
Tom: I've had it up to here! *raises hand*