Getting dressed is a sequence: socks, then shoes. Undoing it runs backwards, shoes off first, then socks. A function built from steps works the same way. f(x)=2x+6 means 'double, then add 6', so its inverse means 'subtract 6, then halve': f−1(x)=2x−6. Start at 5, apply f to get 16, apply f−1 and you are back at 5.
On a graph, an inverse swaps the axes. If (5,16) lies on f, then (16,5) lies on f−1. Swapping every point reflects the graph in the line y=x, which is where the algebra recipe 'swap x and y, then solve for y' comes from. Domain and range trade places too: the outputs of f become the inputs of f−1.
Not every function can be undone. Squaring sends both 3 and −3 to 9, so from 9 alone you cannot tell where you started; on the graph, the horizontal line y=9 hits y=x2 twice. A function must be one-to-one to have an inverse, and the usual fix is to keep only part of the domain. Watch the notation as well: f−1 is not the reciprocal, since 2x+61 is a completely different function from 2x−6.
Think of it like this. An inverse is a translation back. If f translates English into French, f−1 translates the French into English and returns your original sentence. That only works if no two English words share a French word; when two do, the way back is ambiguous, just as 3 and −3 both square to 9.
Core idea. An inverse function reverses a function, turning each output back into the input that produced it.