Minecraft is not a free game on PC, but there is a free demo you can try before buying. The full game must be purchased to unlock everything.
The free demo lets you play a limited version to see if you enjoy it. To play the complete experience — including all game modes and multiplayer — you need to buy the full game.
So while you can sample Minecraft at no cost, ongoing play, saving your progress, and joining servers all require the paid version.