I'm trying to find out how exactly transactions are confirmed in a block. I understand that to confirm a transaction, you hash it with its associated transaction and then the associated hashes until you get the Merkle root, and if the Merkle root is the same as that which is in the block, the transaction is legitimate.
But how would someone know which associated transaction is required to hash with your transaction to confirm its validity? And where would you get it from?
Also, i'm a little confused about Segregated Witness. As I understand it, the signatures are separated from the transactions and the signatures are hashed in the same manner as transactions. This final signature hashed is either hashed with the final transaction hash to form a Merkle root, or it is contained as another Merkle root in a separate field in the block. But if the Merkle root is always the same size (I assume) how does this save space? If the Merkle root is always 256 bits, why does it matter if the signatures are hashed with the transactions or hashed separately?
I can't find clear answers to my questions so any help will be appreciated.