The state of Ethereum (the totality of all accounts, balances, and smart contracts), is encoded into a special version of data structure known generally in computer science as Merkle Tree. This structure is useful for many applications in cryptography because it creates a relationship between all individual pieces of data entangled in the tree, resulting in a single root value that can be used to prove things about the data.
Ethereum's data structure is a 'modified Merkle-Patricia Trie', named so because it borrows some features of PATRICA ( the Practical Algorithm to Retrieve Information Coded in Alphanumeric), and because it is designed for efficient data retrieval of items that comprise the Ethereum state.
A Merkle-Patricia trie is deterministic and cryptographically verifiable: The only way to generate a state root is by computing it from each individual piece of state, and two states that are identical can be easily proven by comparing the root hash and the hashes that led to it (a Merkle proof). Conversely, there is no way to create two different states with the same root hash, and any attempt to modify state with different values will result in different state root hash. Theoretically, this structure provides 'holy grail' of efficiency for inserts, lookups, and deletes.