The difference is that the error cannot be corrected. A warning is just a reminder of a possible error.
The errors can be corrected. Not by the machine because it doesn't have its own decision-making ability and doesn't know what the programmer intends to do. But by the programmer. In fact, the purpose of displaying the errors is to let the programmer know of the issues so that suitable corrections and manipulations can be applied to the code accordingly to make it work the way the programmer wants it to. Code can be compiled in the presence of warnings doesn't imply anything like 'warnings can be/are corrected'.