How do you op yourself in Minecraft?

you can not op yourself, if you host the server you will automatically be owner but the only way to get op is if a op, admin, mod, owner, or co-owner ops you with the command op (player name)