A token is just a contract keeping score
Imagine a single shared notebook on a wall that everyone can read but only one set of rules can edit. The notebook has two columns: who and how much. Alice has 50, Bob has 12, the rest are zero. To "send" 10 from Alice to Bob, nobody passes a physical object — the rule simply crosses out Alice's 50, writes 40, and bumps Bob to 22. That notebook *is* the token. There is no coin anywhere; there is only the ledger of balances and the rule that updates it.
On Ethereum that notebook-with-rules is exactly a smart contract: code and storage living at one address. A token is therefore not a built-in feature of the chain — it is an ordinary contract that happens to track balances. Anyone can deploy one in an afternoon. The chain itself doesn't even know it's a "token"; it just sees a contract whose storage maps addresses to numbers.
ERC-20: when every unit is interchangeable
Most tokens you hear about are fungible: every unit is identical and interchangeable, like dollars or grains of rice. Your 10 units are worth exactly the same as anyone else's 10 — there's no "special" unit. The standard for these is ERC-20, and its heart is that two-column ledger: a mapping from each address to a single number, the balance.
Here's a stripped-down version written in Solidity, Ethereum's main contract language. Notice there is no magic — just a balance table and a `transfer` rule that subtracts from the sender and adds to the receiver.
// a minimal fungible token (ERC-20 idea)
mapping(address => uint256) public balanceOf;
function transfer(address to, uint256 amount) public {
require(balanceOf[msg.sender] >= amount, "too poor");
balanceOf[msg.sender] -= amount; // debit sender
balanceOf[to] += amount; // credit receiver
emit Transfer(msg.sender, to, amount);
}ERC-20 also defines an approve / transferFrom pair, which lets you grant another contract permission to move a set amount on your behalf — the mechanism that powers swapping on a DeFi exchange. You approve the exchange once; it then pulls the agreed amount when you trade.
ERC-721: when every item is unique
Some things aren't interchangeable. Seat 14C on a specific flight, the deed to one house, a numbered concert ticket — swapping yours for someone else's changes *which* thing you hold. These are non-fungible, and their standard is ERC-721. The key change is tiny but profound: instead of mapping an address to *how much*, it maps a unique token id to *who owns it*.
// fungible (ERC-20): address -> amount balanceOf[alice] = 40 // 40 identical units // non-fungible (ERC-721): tokenId -> owner ownerOf[1] = alice // she holds item #1 ownerOf[2] = bob // he holds item #2 ownerOf[3] = alice // and item #3, a different thing // transfer just reassigns one id's owner: ownerOf[1] = bob // item #1 is now bob's
Each id can point to its own picture, song, or document, so an ERC-721 contract is a registry of distinct collectibles. This is the machinery behind the NFT — but the same pattern can title a piece of land, a membership pass, or an in-game sword. Fungible or not, both standards are doing the *same* basic job: a contract keeping an honest, public record of who holds what.
Why the standard is the real magic
If a token is just a contract, anyone could invent their own function names — `send`, `give`, `move`, `yeet`. A wallet would then need custom code for every token ever made, which is impossible. A token standard fixes this by agreeing, in advance, on the exact interface: the function names, their inputs, and the events they emit. ERC-20 promises `transfer`, `balanceOf`, `approve`; ERC-721 promises `ownerOf`, `safeTransferFrom`, and so on.
Think of it like the shape of a power plug. You don't need to know who built a lamp; if it has the standard plug, it fits the socket. Because thousands of tokens expose the *same* ERC-20 shape, a single wallet can display every one of them, and a single exchange can list a brand-new token the day it launches — no special integration required.
So the mental model to carry forward is simple: a token is a contract keeping a ledger, ERC-20 for interchangeable units and ERC-721 for unique items, and a shared standard interface is the quiet agreement that lets every app on the network speak to it. With that in place, the next guides can show what these tokens *do* — pooling into markets, governing organizations, and moving value across the whole Ethereum economy.