In reply to Miroslav Glavic.

What if I am doing some custom coding on one of the files, working for hours then all of a sudden an update comes and either screws my site or just gets rid of the changes with the updated files?

Any custom coding should be done outside of WordPress core files. Automatic updates only affect core files that should never be edited.