Sugar doesn't boil off. Only water boils off.
Most people add it late in the boil. It keeps the gravity lower during the boil and helps with improved hop bitterness extraction. There is nothing wrong with adding it at the start of the boil.
When the boil is over, wort is cooled, and you add yeast, the yeast works on all the available 'simple' sugars (and some of the more complex ones - dextrose is a simple sugar). When you get to a stable gravity, the yeast has used up all the simple sugars and converted it to alcohol.
When bottling, you always need to add a new sugar source for the yeast to work on to create CO2 in the bottle.