display | more...
Debbie's description is absolutly right and I will show you how to calculate the reduced row echelon form of a matrix.

To transform a matrix into the RREF it is only allowed to use so called elemental operations (I hope this is the correct English term):
1. Multiply every element of a row or column with a scalar:

|1 4 5|        |2 8 10|  (*2)
|3 3 1|    ~   |3 3 1 |
|5 3 9|        |5 3 9 |

2. Add the multiple of a row(column) to another row(column):

I:   |1 4 5|        |1  4   5| 
II:  |3 3 1|    ~   |0 -9 -14|  (II-3*I)
III: |5 3 9|        |5  3   9|

3. Swap rows or columns

|1 4 5|        |3 3 3|
|3 3 1|    ~   |1 4 5|
|5 3 9|        |5 3 9|

That's everything that is allowed to do, because these operations do not change the rank of the matrix.
Now I will describe the algorithm itself, afterwards I will give a short example:
The matrix is called A and its elements are a(i,j) where i = 1..m and j=1..n. The first thing to do is to make a(1,1)=1. If a(1,1)!=0 then it is very easy: Just divide the first row or column by its value. If a(1,1)=0 then you have to swap columns and(or) rows to get a non-zero value there.
The next thing to do is to make the rest of the first row and column to zero. We start with the rows: Every row k=2..m will be multiplied with a(k,1) times the first row.
The same has to be done with the columns (though here it is every column l=2..n must be multiplied with a(1,l) times the first column.
The above algorithm has to be repeated for the (m-1)x(n-1) matrix, leaving the first row and column alone. It has to be repeated till the RREF is achived.
The number of non-zero rows or columns is the rank of the matrix.

Example:

I:   |1 2 3|   |1  2  3|             |1  0  0|   |1  0  0| 
II:  |2 3 4| ~ |0 -1 -2| (II-2*I)  ~ |0 -1 -2| ~ |0  1  2|
III: |3 4 5|   |0 -2 -4| (III-3*1)   |0 -2 -4| ~ |0 -2 -4|

I:   |1  0  0|            |1 0  0|   |1 0  0|   |1 0 0|
II:  |0  1  2| (*(-1)) ~  |0 1  2| ~ |0 1  0| ~ |0 1 0|
III: |0 -2 -4|            |0 0 -4| ~ |0 0 -4| ~ |0 0 1|

The last step is not needed as one can already see from the previous matrix that the rank R(A)=3. If you want to check if you understood the algorithm, just use the following example:
|1  2 0 0|
|1 -1 1 0|
|1  0 2 2|

The rank of this matrix is 3. Calculate it yourself!