They may visit other Schengen area countries (outside of country A where they have a residence permit) up to 90 days per 180 day period
countries B, C, D etc.
The days in country A or outside the Schengen Area do not count towards the 90 days.
The 180 day period moves foward one day daily (independent from where you are).
Today, if you were in country B ...