From the following Wikipedia page https://en.wikipedia.org/wiki/Control_theory we see that $u$ is a function "provided" by the controller to balanace the system or get the desired output $y$.
What is the role of $u$ here in general is it given or is part of the problem to find it?
$u$ is a vector of $\mathbb{R}^n$ (most commonly $\mathbb{R}$ for academic examples) which is referred to as the output of the controller or the control input (to the plant). This input is associated with a input signal $u(t)$.
With respect to the notations of the system given in the Wikipedia page, the task is to design a controller, denoted as $C(s)$ or $\Sigma$, such that it converts information about the plant (such as the output of the plant $y$ or the state of the plant $x$) into a control input $u$, so the error between some reference signal $r(t)$ and the output of the plant $y(t)$ is minimized.
Finding the control input $u$ is the indeed the goal, but the key is to design a system that generates this input. This is a much more tractable problem as compared to finding a input out of the blue, and much more suitable for real life control designs. This is because your system and the environment for which your system is situated in will change over time, you cannot guarantee that the input $u$ you have found will always work. Only a feedback controller which continuously generate inputs $u$ will help in these cases.