Rolling: The most recent 180 days are taken into account.
The 90 days can be used all at once or in segments, and can also be spread across multiple countries.
You can enter all your stays into the Schengen Visa Calculator and check compliance with the 90/180-day rule.