Another doubt: why is SHA256 double?
In Bitcoin, when SHA256 is used, its usually hashed twice and thats what we meant. So its basically SHA256(SHA256()) or SHA256D.
It's used to primarily prevent the length extension attack[1] for which SHA256 is vulnerable to but not SHA256D.
[1]
https://en.wikipedia.org/wiki/Length_extension_attack