When the UN General Polls open, every leader of a nation who is part of the UN will be listed. Then each leader and ambassador casts a vote for who they wish to have as UN General.

If someone is elected and doesn't wish to be UN General, then he/she can deny the nomination and the position would go to the runner up.

Once they open you'll clearly see how it all works.