1. A function is a mathematical machine. It consists of three things: a set consisting of the function's inputs (called the domain), a set containing its outputs (called the codomain) and a rule which associates each input to one, and only, output. Example: f : \mathbb{R} \rightarrow \mathbb{R}, f(x) = 5x, this means the inputs are all of the real numbers, and so are the outputs, and the rule is "multiply the input by five". The output of a function, f, corresponding to a particular input, x, is written f(x) and called "the value of f at x."
2. Suppose the codomain (outputs) of a function f is the real numbers, and its domain (inputs) some subset of the real numbers. The derivative of f at (the input) x is the limit
\lim_{h\rightarrow0} \frac{f(x+h)-f(x)}{h}
if it exists. (If not, we say that f is not differentiable at x.)
3. Let's define a function D, the derivative operator. Its codomain (outputs) is the set of functions like f, that is, functions whose codomain is the real numbers, and whose domain some subset of the real numbers. The domain of D is the set of differentiable functions. So, given a particular input, f, the output, D(f) = f' is a new function whose inputs and outputs, like those of f, are real numbers. This new function is defined, of course, by the rule
[D(f)](x) = f'(x) = \lim_{h\rightarrow0} \frac{f(x+h)-f(x)}{h}
We say that the derivative of f at x is [D(f)](x) = f'(x). (I put square brackets around the D(f) just to stress that that's one whole function whose input is x; all the other brackets here mean "what goes inside here is an input".)
Example: f:\mathbb{R} \rightarrow \mathbb{R}, f(x) = x^2, and D(f):\mathbb{R} \rightarrow \mathbb{R}, [D(f)](t) = f'(t) = 2t. Actually, since x can be any number, and t can be any number, it doesn't matter what letter we use to represent them.
"Operator" is just a name often used for a function whose inputs and outputs are other functions. It's conventional not to write brackets around the input of an operator, thus Df for the derivative of f and Df(x) for its value at x.
4. Leibniz notation. This is used with several varieties of meaning. Sometimes an author will specify one meaning. Alternatively, it may be used ambiguously, where the author feels it doesn't matter much whether it means the function or a value of the function. One family of usages goes like this
\frac{\mathrm{d} f}{\mathrm{d} x} = D(f)
\frac{\mathrm{d} }{\mathrm{d} x} f = D(f)
\frac{\mathrm{d} f}{\mathrm{d} x} (x) = [D(f)](x)
Another makes the Leibniz derivative operator symbol say "just while it's with me, treat the expression f(x), or a particular rule of a function, as equivalent to the name of the function f".
\frac{\mathrm{d} f(x)}{\mathrm{d} x} = D(f)
\frac{\mathrm{d} }{\mathrm{d} x} f(x) = D(f)
\frac{\mathrm{d} }{\mathrm{d} x} f(x) \bigg|_{x=t} = [D(f)](t)
where t stands for some particular numerical value that the variable x can take, for example
\frac{\mathrm{d} }{\mathrm{d} x} x^2 \bigg|_{x=3} = 2 \cdot 3 = 6
Another practice is to write y=f(x), then
\frac{\mathrm{d} y}{\mathrm{d} x} = [D(f)](x)
or perhaps
\frac{\mathrm{d} y}{\mathrm{d} x} = D(f)
It's not always clear which is meant.
5. The chain rule. One application of Leibniz notation is as a mnemonic to make the chain rule look like cancelling of fractions, thus
(g \circ f)'(x)=g' \circ f (x)\cdot f'(x)
= g'(f(x)) \cdot f'(x)
may be written, less explicitly, as
\frac{\mathrm{d} z}{\mathrm{d} x} = \frac{\mathrm{d} z}{\mathrm{d} y} \frac{\mathrm{d} y}{\mathrm{d} x}
Note that z on the left denotes the composite function g \circ f, while z on the right denotes the outer function g.