What question are you specifically asking?
How do you create a stored procedure?
How do you create a cursor?
Have you tried Books Online? (Sql server Help)
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/startsql/getstart_4fht.asp
Create Procedure
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/tsqlref/ts_create_4hk5.asp
Don't worry about Cursor. As a beginner I doubt you will need cursors. They are Very inefficient, and I have not created a production cursor in over 5 years.
Might I suggest a book. Learn sql in 21 days will probably help you alot.