There are a few different mechanisms. I might be missing some, but here are the ones I know about.
* The interest owed on loaned DAI (called a stability fee) changes depending on the market price. So if DAI goes too high, the stability fee increases which makes getting a DAI loan less attractive. If the market price goes too low, the stability fee drops. If it drops to 0, this would mean interest free collateralized loans.
* There is a savings account smart contract that generates a variable savings rate on DAI. The savings rate changes depending on the market price.
* There is the Target Rate Feedback Mechanism which frankly I don't understand. It has something to do with changing the amount your collateral is worth depending on DAI's market price.
* When the value of the collateralized asset drops to some defined percentage of the DAI withdrawn (currently 150% I think?), the smart contract can liquidate and auction off that asset for the value of the withdrawn DAI. This increases the value of DAI and also ensures that all DAI is overcollateralized.
* MKR token holders function as the governance for DAI and vote on stuff, like the collateralization rate mentioned above. They get rewards for holding MKR and in normal circumstances the amount of MKR is static. But in the event of a black swan, if the collateralized assets drop to below 1:1 faster than the normal system can handle, MKR is automatically generated and sold to raise the additional collateral needed. This devalues MKR in order to keep DAI stable.