How is that long string of characters called a transaction hash (TxID) generated?
A hash function converts data of any length into a fixed-length output. This output is called a hash value, or digest.
After downloading wallet software, compare its SHA-256 checksum with the one published officially to make sure the installation package hasn’t been tampered with.
$BTC Mining is essentially the repeated calculation of SHA-256 hashes to find a result that meets the difficulty requirements.
If anything wasn’t clear, let me know in the comments.