I am about to quit my current job. This means that I won´t be able to use their SharePoint environment anymore.
Is there a way to get a SharePoint 2013 environment to practice?
There are a lot of opportunities. The cheapest one would be to sign up for Office 365, where you have SharePoint Online for a few bucks a month. Or if you want to run the server version, you'd need an Azure account to use your SharePoint Server in the cloud. See Get started with Azure.
Or one year free by participating in the developer program of Office 365. See Join the Microsoft Office 365 Developer Program.
You can create an environment on a virtual machine an install SharePoint trial for 180 days.
When prompted, provide a product key. You can use one of the following trial product keys. The trial period is 180 days. You can convert to a licensed installation at any time during the trial or after the trial has expired by entering the appropriate product key in Central Administration.
- Enterprise trial product key: NQGJR-63HC8-XCRQH-MYVCH-3J3QR
- Standard trial product key: RTNGH-MQRV6-M3BWQ-DB748-VH7DM
Source: SharePoint Server 2016
If you like to access Server Object Model you can go with the @jpussacq approach of using trail account.
The other option is, as of now Microsoft is giving one year free SPO developer tenant account under dev program. You can follow this url to know more.
Another way to get the free subscription apart from Benny's suggestion.
If you own a MSDN subscription then you will get following benefits.
As JPUSSACQ recommend, you can spin up a virtual machine on your laptop or pc and install the SharePoint trial version or SharePoint foundation ( as you asked for 2013).