What happens to the CMOS when the battery is unplugged?

The newer mainboards (or atleast AMD ones) do not come with a CMOS battery and the power for RTC and BIOS settings is supplied by the main battery.

So what happens to those settings when the battery is unplugged? Do they stay or do they reset to default values?

They’re reset.

The mainboard has a CMOS battery connector, so if you wish to use the mainboard without a big battery, you can use a CMOS one instead.