Define what the function RANK function do and how it different from ROW NUMBER

The RANK() function have same as ROW_NUMBER but the diffrence is on its ouput its display duplicate values are treated as diffrent with this

syntax:- select firstcol,secondcol,rank() over(order by secondcol) as rownumber from tablename