You are looking for a column with datatype Serial
. See this page (bottom) for more information about that datatype.
So for example, your table definition could look like this:
CREATE TABLE yourtable (
rank SERIAL NOT NULL,
username VARCHAR(20) NOT NULL,
password VARCHAR(50) NOT NULL
);