Just 4 potential problems here:
Seals become split, or brittle and need replacing
Thermostats fail. If you suspect this is the problem, by-pass the thermostat and the freezer should run permanently.
Compressors lose gas. (Can be re-gassed)
There is a small electrical component near the compressor called a relay.
This actually "kicks" the compressor into life.
If this fails, there is inevitably a nasty smell of burning. Replacing this item normally cures the problem. (The problem itself is often caused by the freezer being moved and not allowing the gas to settle before switching back on. A minimum period of 24 hours should be allowed.)
Some freezers have cooling motors fitted. These can burn out. Replacing is the cure.
For further help with repairs, try www.howtomendit.com