A short-stay Schengen visa allows a total of at most 90 days within any rolling 180-day period. It is not a fixed calendar period: on any given day, the total number of days spent in the Schengen area within the last 180 days (including that day) must not exceed 90.
How is it counted? Both the entry and exit days count as days spent in the area. Add up all your Schengen days within the last 180 days; if the result is 90 or below, you are within the rule.
Example: if you stayed 10 days and left, then returned 30 days later for another 10 days, you have used 20 days in the last 180 — leaving 70. With a multiple-entry (MEV) visa this allowance can be used again and again during the visa's validity; with a single-entry visa, the visa is spent once you leave the area.
Important: a visa's validity period and the 90/180 rule are separate. Even with a 1-year multiple-entry visa, you may stay at most 90 days in any 180 days. Overstaying significantly increases the risk of refusal in future applications.