As I understand it, SegWit is a soft fork since it doesn't change the block size - just the format of a block. If that's so, how is compatibility maintained? Let's say you have old mining and wallet software that has not been modified to support SegWit. What happens when those things encounter a SegWit-formatted block? It seems like they just wouldn't know what to do with it. Is that true?
When communicating with a node that is running older (pre-SegWit) software, the SegWit node does not send the Witness data. As such, the non-SegWit node sees a transaction that looks like the value can be spent by anyone (instead of the intended recipient).
Mining (building blocks) with old software would be a very bad idea, since you could easily be tricked into including an invalid transaction in your block. If you do that, then the entire network will reject your block and you'll fail to earn any mining revenue.
If you operate a non-mining node with the old software, then you are trusting that the blocks you receive which contain segwit transactions have already been verified by a SegWit node. Since the vast majority of the network IS running SegWit nodes, you should be fine as long as you always follow the chain with the most work.