SQL Server is a relational database management system (RDBMS), and T-SQL is a transactional programming language. This means that it is designed to execute its work in all-or-nothing runs. The database engine is optimized to work in this manner.
Cursors however, like WHILE loops, break away from the transactional nature of T-SQL and allow for programmers to treat each result of a SELECT statement in a certain way by looping through them.
In SQL Server the cursor is a tool that is used to iterate over a result set, or to loop through each row of a result set one row at a time.
Example
Step 1: Declare variables to hold the output from the cursor.
WHILE @@FETCH_STATUS = 0
BEGIN
PRINT cast(@BusinessEntityID as VARCHAR (50)) + ' ' + @BusinessName;
FETCH NEXT FROM @BusinessCursor INTO @BusinessEntityID, @BusinessName;
END