They basically look at a record of over thirty years, and count the number of times that flood or greater event occurred. If it occurred 3 times in 30 years, they say the probability of it happening in any given year is 3 in 30, or 1 in 10 or 10%. They then translate, using (what used to be considered?) high school probability math, this into a recurrence interval of 10 years ( 1/ (10%) = 1/0.1 =10).
They plot the data various ways so that they can get a better fit to estimate extreeme values, but most still assume "stationarity", meaning there is no trend, justified by the long time span and the small changes expected.
I do recall back in '79 arguing with my hydrology professor that the results would be bogus because things are changing due to global warming. Looking back, I would have gotten a better mark in that class had I just kept my mouth shut and stopped interrupting his class.
More sophisticated models do take trends into account, as best they can. However, the rate of global warming is unprecedented, so it's diffuclt to be accurate. A few years back the Ontario Ministry of Transportation revamped, er..enlarged all their culverts, as it was too obvious that they had not been designed big enough.