How Bitcoin Works: Mining, Nodes, and Consensus Explained