The cursor having query will get closed because once the for update clause is fired it locks all the rows which is been modified and once it encounters a commit/rollback it automatically comes out of that session and will be processing a fresh loop altogether.
When u will executed this statement into the server that's time commit mechanism will start to save a record as permanently into the database. COMMIT statement it's part of TCL Language.
DECLARE CURSOR C IS SELECT * FROM EMP WHERE ROWNUM <4; R C ROWTYPE; BEGIN OPEN C; LOOP FETCH C INTO R; DBMS_OUTPUT.PUT_LINE (R.EMPNO); EXIT WHEN C NOTFOUND; UPDATE EMP SET SAL SAL-1; COMMIT; END LOOP; CLOSE C; END;