To freeze a row in your worksheet, highlight the row where you wish all rows before the highlighted row to be frozen or locked, go to Window>Freeze Panes and you will see a line appear across your worksheet. Everything above the line is frozen and will remain in view when you scroll down your worksheet.
Freeze Columns
To freeze a column in your worksheet, highlight the column where you wish all columns before, the highlighted column to be frozen or locked, go to Window>Freeze Panes and you will see a line appear down your worksheet. Everything to the left of the line is frozen and will remain in view when you scroll across your worksheet.
Freeze both Columns and Rows
Click in a single cell of your worksheet and go to Window>Freeze Panes. This will freeze all rows above the selected cell and all columns to the left of the selected cell.