This highly depends what nationality you are. If I assume that you are not from the EU, you need to apply for a long stay visa. If you are non-EU and from Canada, Australia or New Zealand, you can apply for a working holiday visa.
There are two websites which give you more information on the process:
Credit:stackoverflow.com‘
5 Mar, 2024
4 Mar, 2024
4 Mar, 2024
5 Mar, 2024