Quarantined messages stay until you act on them or until the time you set runs out. Choose it in Settings → Keep quarantined messages:
- 30 days or 90 days: older messages then move to the trash.
- Forever: they stay until you delete them.
The trash: deleted quarantined messages stay there for 30 days, then they're deleted for good.
To empty quarantine at once, see "Clearing history or quarantine". To keep copies, move them to the phone's message store or export everything first.