Technically retiring can mean worked long enough to get a pension.
Some people in the army, used to be able to "retire" after 20 years. Collect a pension. There was nothing stopping them going and getting another job.
As Matt says, it normally means stopping work, as when people decide they have earned enough money, or are old enough (to get a pension?).