The answer is both yes and no. You don't have to spend real money to enjoy Second Life, but many people do.
You can earn Linden Dollars (L$) by working and creating within the game, then spend that in-game currency at shops and the marketplace. However, a large portion of players invest real cash, converting it into L$ through PayPal or a bank account—much like buying in for a poker night with friends.
So while real money can be used in Second Life, it's never a requirement. You can play, explore, and have fun entirely with in-world earnings if you prefer. In short: yes, you can use real money, but no, you never have to.