Ubuntu, other than most distributions as well as MS Windows, decided to move its window menu buttons to the left side of the top window panel. This brings along many accustomization problems for people who are used to rush their mouses to the top right instinctively.
If you want to, you can revert this change with the help of gconf-editor.
Open it by entering gconf into Dash or
into a terminal. Browse the left pane for /apps/metacity/general and look for the value of button_layout which should be close,minimize,maximize: . This value defines where the buttons are positioned and in which order - the commands stand for the appropriate button whereas the colon determines on which side they will be. You can also add a menu button by including menu.
To move the buttons to the right and adjust their order, a value like
would be appropriate. Don't forget to set the colon or metacity will crash as soon as you have entered and confirmed your value!