When the question appears
Rarely on its own. Usually on a sale, when the buyer or the bank asks for documents and it turns out what stands there does not match what was approved. Or on an inheritance, when something has to be divided that does not exist on paper. Or when a neighbour reports it.
Many of these structures were put up decades ago, by people who are no longer here, at a time when nobody asked.
First, establish what it actually is
Not every discrepancy is unlawful construction. There is a difference between building without a permit, building in departure from what was approved, and a change that never required a permit at all.
What gets checked is what was approved, what physically stands there, when it was built, and under which regime it falls. The year matters, because the rules have changed and some older structures fall under a lighter procedure.
Two possible outcomes
Legalisation. Where it is permitted, it runs through an administrative procedure with documents, drawings and fees. It takes time and it is not a formality, but it closes the question for good.
Removal. Where legalisation is not available. Here the work is to judge realistically whether there is a ground to challenge, or whether it is wiser to negotiate the timing and the manner.
Sometimes the honest answer is the second one. I will tell you that rather than take you through a procedure that will not end well.
If you are buying
This is one of the reasons the check belongs before the deposit. Unlawful construction does not disappear when the owner changes, and the penalty and the obligation to remove travel with the property. See property due diligence.
If a notice or an order has already been issued
Then there is a deadline and it is short. Do not leave the document in a drawer to think about. Bring it.
What I will need
The title document, a cadastral plan, whatever construction paperwork you have, and every order, notice or letter received from the municipality. If you roughly know the year it was built, say that too.
This page provides general information and does not constitute legal advice on any specific case. Rights and deadlines depend on the facts and the applicable law.