you'll get a clear picture of all related questions if you read this book 'Mastering Bitcoin' by Andreas Antonopoulos
This book is a fantastic intro to bitcoin and is available for free if you were looking for it
https://github.com/bitcoinbook/bitcoinbook