Behavior of Boost and Buck Converters

do they try to hold the output voltage constant

Yes they do, these converters are mostly used for supplying a circuit with a constant supply voltage. Although it would be possible to make a converter where \$V_{out} = n *Vin\$ there is not much use for such a circuit. Most circuits rely on/need a constant supply voltage.

Ideally you want the output voltage to be independent of changes in the input voltage.

Higher input voltage:

No problem for a buck/down converter as long as it is within the limits it can handle

For most boost converters, depending on how they're made, the output voltage would rise with the input voltage. So for a boost converter, increasing the input voltage too much is not desirable.

Too low input voltage:

A buck/down converter will output a voltage as high as it can, this will then often be the input voltage or a bit lower.

For a boost converter it will maintain the proper output voltage as long as it is capable.

In general, buck and boost converters are designed to regulate the output voltage over changes in line and load.

However, they don't have to be, and some DC-DC converters are designed to provide a fixed ratio conversion, especially buck converters. A DC-DC fixed ratio converter is sometimes called a "bus converter". See here

Some converters have "pass-through" mode, so that in the case of a buck where the input voltage falls below the output set point the output will track the input voltage minus a small drop.

The converse holds true for boost converters, and in a non-synchronous boost when the input rises above the set-point usually the controller stops switching and the input passes through to the output through the boost diode.

In converters without "pass-through" the out-of-normal-range behavior depends on the individual design and controller used. In any case there's always a low voltage limit where the circuitry can no longer work and a high voltage limit that will damage the components.