I am about to go over seas and when considering powered items I am bringing, some things state they can take both 120 and 240 volts. What do devices usually do to make sure their output is the same given either input?
There are two common ways - both ensure that the DC/DC downconverter stage sees the same input voltage regardless of the mains voltage, which allows it to regulate more easily (smaller operating range).
The cheap/quick-n-dirty way (think low-cost PC power supply) is a range switch which controls a voltage doubler. In "low" / 120V range the AC is rectified and fed to a capacitive doubler circuit which doubles the 170V rectified input voltage to around 340V. In "high" / 240V range, the AC is rectified and is left alone (still at 340VDC or so). Bad things happen if the switch is in the wrong position vs. the input.
The modern/fancier/nicer way is to have a preregulator stage, which boosts the rectified AC voltage up to 400VDC regardless of input voltage. This is normally the function of an active power factor correction (PFC) stage, which uses AC waveshaping and some mathematics to force the converter to draw current in phase with the voltage (i.e. makes it look like a resistor with close to unity power factor) which makes for less line pollution and universal input capability at the cost of some extra losses (you now have two converters instead of one).
Of course, the DC/DC downconverter stage will have a closed-loop feedback system to ensure the output rail remains in regulation, but keeping the input voltage to the DC/DC stage within bounds affords the designer some advantages - you don't need to design the stage to handle a wide range of duty cycles which simplifies a lot of things. A DC/DC stage which accepts rectified 100-240VAC with no preregulator will need to operate over a huge range of duty cycles depending both on the mains voltage (regardless of DCM or CCM mode) and the load condition (for DCM) which affects the feedback loop and magnetic design (among other things).
What do devices usually do to make sure their output is the same given either input?
These devices (power adapters) have a build-in (constant) voltage reference (usually a bandgap reference or a zener diode) which they use to compare the actual output voltage against. That way as long as the input voltage is within the range for which the adapter is designed, the output voltage will be the same.
The voltage is regulated by means of a switching transistor which is controlled by a signal which depends on what needs to be done to get the required output voltage. This way the output voltage stays the same for no load, a light load of full load and for varying input voltages.