A Hard Fork is a software upgrade that introduces a new rule in the network that is not compatible with the older software. Nodes that continue to run the old version of the software will consider new transactions as invalid. For example, a new rule that allows block size to be 2MB instead of 1MB would require hard fork.
A Soft Fork, on the contrary, is any backward-compatible change. For example, a new rule that allows block size to be 0.5 MB instead of 1MB would require a soft fork.