I'm currently taking maths at A Level and I have found it strange that it is not explained why the differential of $x^n$ is $nx^{n-1}$, for example. I can see that it works through observation and first principle, but how can it be derived? And what about for an unknown function, not based on trigonometry, $e^x$ or polynomials? Is there some sort of intuition or derivation that can lead to a general answer, other than making observations? Another thing that I do not quite understand is why higher derivatives of some function is denoted by $\frac{d^ny}{dx^n}$.
Sorry if this sounds really basic but I would appreciate any explanations/links to good resources (I've had a look online and couldn't find too much other than some nice explanations special cases etc). Thanks :)

Firstly I'll go over the definition of the derivative, and why the derivative of $x^n$ is $n x^{n-1}$. Then I'll try to explain what the derivative is trying to capture, and why the definition makes sense.
For a function $f(x)$, its derivative is defined as being $$f'(x) = \lim_{h\to0} \frac{f(x+h)-f(x)}{h}$$ If you haven't met limits before (as I suspect an A-level student may not have), the idea is that the limit tries to capture what a function looks like near a point, in particular here what $\frac{f(x+h)-f(x)}{h}$ is like near $0$, even though at $0$ it's not defined.
For $f(x) = x^n$, we have
$$f'(x) = \lim_{h\to0} \frac{f(x+h)-f(x)}{h}$$ $$f'(x) = \lim_{h\to0} \frac{(x+h)^n-x^n}{h}$$ $$f'(x) = \lim_{h\to0} \frac{x^n + n h x^{n-1} + \frac{n(n-1)}{2} h^2 x^{n-1} + ... + h^n -x^n}{h}$$ $$f'(x) = \lim_{h\to0} (n x^{n-1} + \frac{n(n-1)}{2} h x^{n-1} + ... + h^{n-1})$$ Now you can see that each term except the first contains an $h$, so for really small $h$ they're $0$, but the first term is independent of $h$. This gives that $$f'(x) = n x^{n-1}$$.
Now let's talk about the way you should think about the derivative of a function. The derivative of a function tries to say how much the value of the function changes when you change the input by a tiny amount - and you'll consider the ratio of the change, in the same way as you'd consider a percentage change. In particular, you might want to know how much $x^2$ changes when you move from $x=2$ to $x=2.01$, for instance. Another way of thinking about this is the tangent line to the function at a point, so we might want to know what the slope of the tangent to $y=x^2$ is when $x=2$, and it doesn't take much thought to see why these are both the same idea. To look at the tangent line, it makes sense to instead consider the point $(2, 2^2)$ and another point really close to it, say $(2.01, 2.01^2)$, or $(2.0001, 2.0001^2)$, or $(2+h, (2+h)^2)$, where $h$ is really close to $0$ (possibly negative), and look at what the slope of the line connecting these two is for tiny $h$. This starts to look like the definition of the derivative, because the slope of the line connecting $(2+h, (2+h)^2)$ and $(2, 2^2)$ is $$\frac{(2+h)^2 - 2^2}{2+h-2} = \frac{(2+h)^2 - 2^2}{h}$$
and just like above, you can compute the limit of this expression to be $4$.
This easily generalises to any point $x$ (instead of $2$), and to any (differentiable) function (instead of $x^2$), to give a limit as defined above.
It's important to realise that the derivative is another function in itself, and the meaning of $f'(x) = 2x$ is that at the point $t$, the slope of the tangent line to $y=f(x)$ at $t$ is $2t$.
The derivative of any differentiable function could, in theory, be computed directly from the limit, but that's often tedious. So, we use tricks like linearity (sometimes called the sum rule), the product and quotient rules, and the chain rule. It might be instructive to try to prove linearity and the product rule yourself, directly from the definition of the limit.