Remove empty directory in Linux: rmdir and rm -d

I know 2 ways ro remove empty test directory:

rm -d test
or:
rmdir test