Cursor in SQL is a temporary work area that is created in the system memory whenever the SQL statement is executed. This contain information of the statement you selected and the row of the data accessed by it. Basically the temporary work area is used to store the data received from the database, and manipulate it. A cursor have a capability to hold more than one row, but process only one row at a time. Cursor hold the set of row that known as active set. Cursor is mainly of two type Implicit and Explicit.
When cursor should be used by implicit and explicit way
Implicit cursors are created by default when the statements like INSERT, UPDATE, DELETE all DML statements are executed. When they are created? When the SELECT statement that returns just one row is executed.
Explicit cursor is used when SELECT statement is executing and returning more than one row. This cursor is able to store multiple records that can be processed at a time which are known as current row. Once the row is fetched then cursor move to the next row.