The informational page "Retiring" describes the community's perspective about leaving Wikipedia, which an editor may decide to do permanently because of a negative experience, lack of interest, or other personal reasons.
Short of leaving altogether, an editor is considered "semi-retired" when their editing frequency decreases significantly. Retired users are welcome to return, though repeatedly retiring and returning is frowned upon. This can be confusing to other editors and may mark you as overly dramatic.
Users who anticipate a temporary leave of absence, such as starting a new job, enrolling in school, or taking an extended vacation, are encouraged to use a "wikibreak" template instead of claiming retirement.
Of course, some editors lose interest in editing Wikipedia naturally, and depart quietly. Declaring retirement is often interpreted as an "official" statement, with permanence, so try not to do so unless you are fairly certain you will not be contributing to Wikipedia again.