Like any other blockchain, Ethereum needs several thousand people running a software on their computers to power the network. At its core, Ethereum is a programmable blockchain. Users can create any sort of applications they want, only one of which is a currency (such as the Bitcoin.)
Every node (computer) in the network runs something called the Ethereum Virtual Machine (EVM). Think of EVM as a operating system that understands and executes the software written in the Ethereum specific programming language. The software/apps executed by the EVM are called ‘smart contracts.’ We'll cover Smart Contracts in the next article in this guide.
The EVM protects the main blockchain by allowing programmers to carry out test phases of their programs in a real use-case environment without affecting the main blockchain. Each EVM on every node is a completely segregated network on its own, so as not to affect the main blockchain. It is also Turing-complete, meaning that it can execute any arbitrary code that the developers can come up with.
Ether is the token that fuels the Ethereum blockchain. It serves two key purposes:
We told you that the user using a smart contract must pay a certain price to execute it. This price is paid to the node that actually spends memory, storage, computation and electricity to execute the smart contract.
To calculate the prices of smart contracts, every statement has an assigned cost to it. For example, if you execute a statement that uses the node’s memory, those type of statements have a specific cost. If you execute a statement that uses the node’s disk storage, those kind of statements have a specific cost attached to them. The unit in which the cost is defined is called Gas. Eventually, Gas is converted to ether using an exchange rate.
Whenever you execute a smart contract, you have to define the maximum Gas to be consumed. The execution will stop either when the execution is completed or when the Gas Limit is reached. This is done to avoid infinite loops in smart contracts, preventing the program getting stuck executing a set of statements repeatedly without proceeding further.
Such situations occur because of programmer’s carelessness. With every repetition, some of the assigned Gas will be used, thus making any infinite loop a finite one. It doesn’t make any sense for a node to be stuck in execution because of a programmer’s mistake. The concept of Gas solves this problem.
This protocol also mitigates Distributed Denial of Service (DDoS) attacks against Ethereum, since every operation would require the malicious actor to pay up some ether. At some point they're gonna run out of ether, thereby ending the attack.
Primarily, you can get Ether from mining, or buying it an an exchange. There are many online exchanges around the world now where you can buy Ether. See the guide here if you'd like to learn how to trade Ether on exchanges.