Declare your cursor as follows
USE PUBS
DECLARE @lName varchar(40)
DECLARE crsMyCursor CURSOR FOR
SELECT au_lname FROM AUTHORS
OPEN crsMyCursor
FETCH NEXT FROM crsMyCursor INTO @lName
UPDATE Authors SET au_lname = 'Hello World' WHERE CURRENT OF crsMyCursor
CLOSE crsMyCursor
DEALLOCATE crsMyCursor