That leaves me confused.
My understanding follows - I would appreciate if somebody could confirm.
To understand what an hard fork is, we must describe how the blockchain works.
As people use BTC, transactions get generated. Those transactions get encoded in a block of data. The miners look at this data and try to figure out the nonce which will match the block header.
When a miner finds a nonce, the block has been found and it is added on top of the blockchain.
However, a set of miners might produce an incorrect nonce - perhaps maliciously - and propose it as a block solution - you might have heard of 51% attacks - this mismatching nonce creates a fork in the blockchain ("soft") as soon as the later nonce is found for the same block.
In real world, chains have a single end. When a chain is forked, it is not a proper chain. As miners keep hashing, they will add blocks on top of the previous. Some miners might get stuck on the "good" end, while some others will keep going on the "bad" end. Because of subtle details, one of those ends will eventually dominate and the other will be "orphaned" and considering invalid.
With an hard-fork, we decide a new way of doing things. So we voluntarily generate another path to follow. BUT both ends are technically correct. One is correct by the old standard, the other by the new standard. Since they are both correct, everyone not upgrading will continue working on the "old" end. You will understand this is not a good thing, and that's the reason for which hardforks are approached with care.
They are "hard" because they don't come from normal operation but rather a decision we make in upgrading the miners to the new protocol/hashing/whatever.
You are pretty close. You have a few of the details slightly wrong though.
An incorrect nonce will not be accepted by any peers (regardless of how much hash power you have). Therefore a "mismatching nonce" does not create a fork.
This has nothing to do with a 51% attack. A 51% attack is when someone has so much hash power that they can solve blocks faster than the entire combined rest of the network.
A fork can occur any time nodes disagree on which block is the next block on the blockchain.
As an example, two different miners (or mining pools) can both solve a valid block at almost the same time. Each solution is a bit different, but they are both completely valid. The miners each relay their block to the peers that they are connected to. This means some of the network first hears about the block from one miner, and the rest of the network hears about the block from the other miner. There is no reliable way for any peer to know which block was solved first. One thing any node can be sure about is which block "they" heard about first. So, each node assumes that the block they heard about first is the winning block. The network has now forked, with some nodes accepting one block onto their blockchain, and other nodes accepting the other block. Eventually a miner will solve a block on top of one of these two blocks. When that happens, their chain becomes longer, and the rest of the network accepts that they have the wrong block. The entire network switches over to the longer chain, and the block from the shorter chain is abandoned (you'll often hear this referred to as "orphaned"). Orphans happen all the time, and are a natural part of the consensus building process that bitcoin is built around.
As you pointed out, a hard fork occurs if a change is made to the protocol such that blocks that are considered valid by one version of the software are not considered valid by another version. In particular a hard fork occurs when
something that is accepted as valid in the new software, wasn't previously accepted as valid in the old software. This means that blocks from the new software will not be recognized as valid by the old software. The chain will split if anyone is still running the old software. Depending on how long it takes people to notice that their old software isn't matching the rest of the network, it can create quite a mess for individuals who upgrade and suddenly find that transactions they thought were valid and completed suddenly don't exist.
This is often talked about in discussions about intentional changes to the protocol, but hard forks can occur accidentally as well. It is possible for an unnoticed bug in a new version of the software to result in a fork. Even though there is no "decision we make" to intentionally create the fork, the result is the same (a hard fork).
A soft fork is similar to a hard fork, but not quite as disruptive. With a soft fork, something that is now invalid in the new software was not considered to be invalid by the old software. With a soft fork, blocks that are created by the new software are still recognized as valid by users that haven't upgraded. If you aren't aware, and don't upgrade right away, you'll still see the same blockchain as the rest of the network. If you are a miner your blocks will be more likely to be orphaned since much of the network won't accept your blocks, but for the average user, they won't experience much of an inconvenience from a soft fork.