To cut through some of the confusion surrounding bitcoin, we need to separate it into two components. On the one hand, you have bitcoin-the-token, a snippet of code that represents ownership of a digital concept – sort of like a virtual IOU. On the other hand, you have bitcoin-the-protocol, a distributed network that maintains a ledger of balances of bitcoin-the-token. Both are referred to as “bitcoin.”

The system enables payments to be sent between users without passing through a central authority, such as a bank or payment gateway. It is created and held electronically. Bitcoins aren’t printed, like dollars or euros – they’re produced by computers all around the world, using free software.

It was the first example of what we today call cryptocurrencies, a growing asset class that shares some characteristics of traditional currencies, with verification based on cryptography.

Bitcoin can be bought on exchanges, or directly from other people via marketplaces.

You can pay for them in a variety of ways, ranging from hard cash to credit and debit cards to wire transfers, or even with other cryptocurrencies, depending on who you are buying them from and where you live.

1 – Set up a wallet

The first step is to set up a wallet to store your bitcoin – you will need one, whatever your preferred method of purchase. This could be an online wallet (either part of an exchange platform, or via an independent provider), a desktop wallet, a mobile wallet or an offline one (such as a hardware device or a paper wallet).

Even within these categories of wallets there is a wide variety of services to choose from, so do some research before deciding on which version best suits your needs.

You can find more information on some of the wallets out there, as well as tips on how to use them, here and here.

The most important part of any wallet is keeping your keys (a string of characters) and/or passwords safe. If you lose them, you lose access to the bitcoin stored there.


BUYING ONLINE

2 – Open an account at an exchange

Cryptocurrency exchanges will buy and sell bitcoin on your behalf. There are hundreds currently operating, with varying degrees of liquidity and security, and new ones continue to emerge while others end up closing down. As with wallets, it is advisable to do some research before choosing – you may be lucky enough to have several reputable exchanges to choose from, or your access may be limited to one or two, depending on your geographical area.

The largest bitcoin exchange in the world at the moment in terms of US$ volume is Bitfinex, although it is mainly aimed at spot traders. Other high-volume exchanges are CoinbaseBitstamp and Poloniex, but for small amounts, most reputable exchanges should work well. (Note: at time of writing, the surge of interest in bitcoin trading is placing strain on most retail buy and sell operations, so a degree of patience and caution is recommended.)

With the clampdown on know-your-client (KYC) and anti-money-laundering (AML) regulation, many exchanges now require verified identification for account setup. This will usually include a photo of your official ID, and sometimes also a proof of address.

Most exchanges accept payment via bank transfer or credit card, and some are willing to work with Paypal transfers. And most exchanges charge fees (which generally include the fees for using the bitcoin network).

Each exchange has a different procedure for both setup and transaction, and should give you sufficient detail to be able to execute the purchase. If not, consider changing the service provider.

Once the exchange has received payment, it will purchase the corresponding amount of bitcoin on your behalf, and deposit them in an automatically generated wallet on the exchange. This can take minutes, or sometimes hours due to network bottlenecks. If you wish (recommended), you can then move the funds to your off-exchange wallet.


BUYING WITH CASH

2 – Choose a purchase method

Platforms such as LocalBitcoins will help you to find individuals near you who are willing to exchange bitcoin for cash. Also, LibertyX lists retail outlets across the United States at which you can exchange cash for bitcoin. And WallofCoinsPaxful and BitQuick will direct you to a bank branch near you that will allow you to make a cash deposit and receive bitcoin a few hours later.

ATMs are machines that will send bitcoin to your wallet in exchange for cash. They operate in a similar way to bank ATMs – you feed in the bills, hold your wallet’s QR code up to a screen, and the corresponding amount of bitcoin are beamed to your account. Coinatmradar can help you to find a bitcoin ATM near you.


*Specific businesses mentioned here are not the only options available, and should not be taken as a recommendation.

**Please, never invest more than you can afford to lose – cryptocurrencies are volatile and the price could go down as well as up.

Bitcoin mining is the process by which transactions are verified and added to the public ledger, known as the block chain, and also the means through which new bitcoin are released.  Anyone with access to the internet and suitable hardware can participate in mining.

The mining process involves compiling recent transactions into blocks and trying to solve a computationally difficult puzzle.  The participant who first solves the puzzle gets to place the next block on the block chain and claim the rewards.

The rewards, which incentivize mining, are both the transaction fees associated with the transactions compiled in the block as well as newly released bitcoin.

Nodes

Backtracking a bit, let’s talk about “nodes.” A node is a powerful computer that runs the bitcoin software and helps to keep bitcoin running by participating in the relay of information. Anyone can run a node, you just download the bitcoin software (free) and leave a certain port open (the drawback is that it consumes energy and storage space – the network at time of writing takes up about 145GB). Nodes spread bitcoin transactions around the network. One node will send information to a few nodes that it knows, who will relay the information to nodes that they know, etc. That way it ends up getting around the whole network pretty quickly.

Some nodes are mining nodes (usually referred to as “miners”). These group outstanding transactions into blocks and add them to the blockchain. How do they do this? By solving a complex mathematical puzzle that is part of the bitcoin program, and including the answer in the block. The puzzle that needs solving is to find a number that, when combined with the data in the block and passed through a hash function, produces a result that is within a certain range. This is much harder than it sounds.

(For trivia lovers, this number is called a “nonce”, which is a concatenation of “number used once.” In the case of bitcoin, the nonce is an integer between 0 and 4,294,967,296.)

Solving the puzzle

How do they find this number? By guessing at random. The hash function makes it impossible to predict what the output will be. So, miners guess the mystery number and apply the hash function to the combination of that guessed number and the data in the block. The resulting hash has to start with a pre-established number of zeroes. There’s no way of knowing which number will work, because two consecutive integers will give wildly varying results. What’s more, there may be several nonces that produce the desired result, or there may be none (in which case the miners keep trying, but with a different block configuration).

The first miner to get a resulting hash within the desired range announces its victory to the rest of the network. All the other miners immediately stop work on that block and start trying to figure out the mystery number for the next one. As a reward for its work, the victorious miner gets some new bitcoin.

Economics

At the time of writing, the reward is 12.5 bitcoins, which at time of writing is worth almost $200,000.

Although it’s not nearly as cushy a deal as it sounds. There are a lot of mining nodes competing for that reward, and it is a question of luck and computing power (the more guessing calculations you can perform, the luckier you are).

Also, the costs of being a mining node are considerable, not only because of the powerful hardware needed (if you have a faster processor than your competitors, you have a better chance of finding the correct number before they do), but also because of the large amounts of electricity that running these processors consumes.

And, the number of bitcoins awarded as a reward for solving the puzzle will decrease. It’s 12.5 now, but it halves every four years or so (the next one is expected in 2020-21). The value of bitcoin relative to cost of electricity and hardware could go up over the next few years to partially compensate this reduction, but it’s not certain.

Difficulty

The difficulty of the calculation (the required number of zeroes at the beginning of the hash string) is adjusted frequently, so that it takes on average about 10 minutes to process a block.

Why 10 minutes? That is the amount of time that the bitcoin developers think is necessary for a steady and diminishing flow of new coins until the maximum number of 21 million is reached (expected some time in 2140).

Simple version:

If I want to send some of my bitcoin to you, I publish my intention and the nodes scan the entire bitcoin network to validate that I 1) have the bitcoin that I want to send, and 2) haven’t already sent it to someone else. Once that information is confirmed, my transaction gets included in a “block” which gets attached to the previous block – hence the term “blockchain.” Transactions can’t be undone or tampered with, because it would mean re-doing all the blocks that came after.

Getting a bit more complicated:

My bitcoin wallet doesn’t actually hold my bitcoin. What it does is hold my bitcoin address, which keeps a record of all of my transactions, and therefore of my balance. This address – a long string of 34 letters and numbers – is also known as my “public key.”  I don’t mind that the whole world can see this sequence. Each address/public key has a corresponding “private key” of 64 letters and numbers. This is private, and it’s crucial that I keep it secret and safe. The two keys are related, but there’s no way that you can figure out my private key from my public key.

That’s important, because any transaction I issue from my bitcoin address needs to be “signed” with my private key. To do that, I put both my private key and the transaction details (how many bitcoins I want to send, and to whom) into the bitcoin software on my computer or smartphone.

With this information, the program spits out a digital signature, which gets sent out to the network for validation.

This transaction can be validated – that is, it can be confirmed that I own the bitcoin that I am transferring to you, and that I haven’t already sent it to someone else – by plugging the signature and my public key (which everyone knows) into the bitcoin program. This is one of the genius parts of bitcoin: if the signature was made with the private key that corresponds to that public key, the program will validate the transaction, without knowing what the private key is. Very clever.

The network then confirms that I haven’t previously spent the bitcoin by running through my address history, which it can do because it knows my address (= my public key), and because all transactions are public on the bitcoin ledger.

Even more complicated:

Once my transaction has been validated, it gets included into a “block,” along with a bunch of other transactions.

A brief detour to discuss what a “hash” is, because it’s important for the next paragraph: a hash is produced by a “hash function,” which is a complex math equation that reduces any amount of text or data to 64-character string. It’s not random – every time you put in that particular data set through the hash function, you’ll get the same 64-character string. But if you change so much as a comma, you’ll get a completely different 64-character string. This whole article could be reduced to a hash, and unless I change, remove or add anything to the text, the same hash can be produced again and again. This is a very effective way to tell if something has been changed, and is how the blockchain can confirm that a transaction has not been tampered with.

Back to our blocks: each block includes, as part of its data, a hash of the previous block. That’s what makes it part of a chain, hence the term “blockchain.” So, if one small part of the previous block was tampered with, the current block’s hash would have to change (remember that one tiny change in the input of the hash function changes the output). So if you want to change something in the previous block, you also have to change something (= the hash) in the current block, because the one that is currently included is no longer correct. That’s very hard to do, especially since by the time you’ve reached half way, there’s probably another block on top of the current one. You’d then also have to change that one. And so on.

This is what makes Bitcoin virtually tamper-proof. I say virtually because it’s not impossible, just very very, very, very, very difficult and therefore unlikely.

Fun

And if you want to indulge in some mindless fascination, you can sit at your desk and watch bitcoin transactions float by. Blockchain.info is good for this, but if you want a hypnotically fun version, try BitBonkers.

These days virtually all the methods available to buy bitcoin also offer the option to sell.

The exception is bitcoin ATMs – some do allow you to exchange bitcoin for cash, but not all. Coinatmradar will guide you to bitcoin ATMs in your area.

All exchanges allow you to sell as well as buy. What type of exchange you choose to sell your bitcoin will depend on what type of holder you are: small investor, institutional holder or trader?

Some platforms such as GDAX and Gemini are aimed more at large orders from institutional investors and traders.

Retail clients can sell bitcoin at exchanges such as CoinbaseKrakenBitstampPoloniex, etc. Each exchange has a different interface, and some offer related services such as secure storage. Some require verified identification for all trades, while others are more relaxed if small amounts are involved.

(Of course, don’t forget to declare any profit you make on the sale to your relevant tax authority!)

You can, if you wish, exchange your bitcoin for other cryptoassets rather than for cash. Some exchanges such as ShapeShift focus on this service, allowing you to swap between bitcoin and ether, litecoin, XRP, dash and several others.

Another alternative is the direct sale. You can register as a seller on platforms such as LocalBitcoinsBitQuickBittylicious and BitBargain, and interested parties will contact you if they like your price. Transactions are usually done via deposits or wires to your bank account, after which you are expected to transfer the agreed amount of bitcoin to the specified address.

Or, you can sell directly to friends and family once they have a bitcoin wallet set up. Just send the bitcoin, collect the cash or mobile payment, and have a celebratory drink together. (Note: it is generally not a good idea to meet up with strangers to exchange bitcoin for cash in person. Be safe.)

(Note: specific businesses mentioned here are not the only options available, and should not be taken as a recommendation.)