Utility is in one sense extremely simple, and in another tremendously complex. The basic idea of some things being better than other things is something we intuit, probably from birth, wired into our brains by evolution: we like eating sugar, we don't like getting burned. But actually formalizing utility into...
Utility is in one sense extremely simple, and in another tremendously complex. The basic idea of some things being better than other things is something we intuit, probably from birth, wired into our brains by evolution: we like eating sugar, we don't like getting burned. But actually formalizing utility into something that can be applied in economic theory to understand human behavior is fiendishly complicated.
In general what we do is abstract away from all this, and simply take it as given that we can assign some number to each thing (each good we might buy, or each event that might happen to us), where higher numbers are better than lower numbers, and call that the utility. Then, we assume that people seek to maximize that utility, choosing things that will lead them to higher numbers.
Economists generally distinguish between two concepts of utility, a "weak" or ordinal utility which only says whether A is better than B, but cannot say how much, and a "strong" or cardinal utility that actually says that A is some number X units of utility better than B.
Cardinal utility is much easier to work with, especially when dealing with matters of risk; but it is also much harder to measure in the real world. We can relatively straightforwardly determine whether people like A versus B by giving them the choice and seeing which one they go for; but in order to determine how much more, we need to devise far more complicated and clever experiments. Worse, it's actually quite common for people to behave in experiments in such a way that they can't possibly be acting by a coherent utility function, but instead must be using some sort of heuristics to make their judgments; the field of behavioral and cognitive economics arose from such findings.
The units of measure for cardinal utility are also quite strange, and there is no standard unit for utility currently used by economists. Hypothetically we may speak of "utiles" or "utilons", but in reality there is no way of actually measuring such a thing. Most real work in welfare economics tries to assign utility as dollar values of "willingness-to-pay", which is simplest but carries many pitfalls; to avoid these some economists have borrowed welfare measures from public health and use measures such as Disability Adjusted Life Years or Quality Adjusted Life Years---but these too are not without their flaws. For these reasons, sometimes ordinal utility is more useful, and we can simply try to determine what people prefer, without worrying about the magnitudes of the differences.
Still, the essential concept that people try to maximize their own welfare and seek what they like over what they do not like is a very fundamental and useful one. Humans do not behave randomly, nor do they generally seek out things that hurt them without some commensurately large benefit. If we could actually precisely measure utility, it would provide us with very detailed information about how people make decisions.