Newton's second law hands us the acceleration, not the position. So the usual job in mechanics runs the other way from Acceleration as a Derivative: start from $a(t)$ and work back to $v(t)$ and $x(t)$. That is antidifferentiation, and as in Antiderivatives with Initial Conditions, each step brings a constant that the starting conditions decide.
🔑 Key idea
$$v(t) = v_0 + \int_0^t a(t')\,dt', \qquad x(t) = x_0 + \int_0^t v(t')\,dt'.$$ The area under the $a$–$t$ graph from 0 to $t$ is the change in velocity; the area under the $v$–$t$ graph is the change in position.
💡 Why it works
The fundamental theorem of calculus says $\int_0^t \dfrac{dv}{dt'}\,dt' = v(t) - v(0)$. Since $dv/dt = a$, the integral of the acceleration is the change in velocity, and adding the starting velocity gives the velocity itself. In pictures: each thin strip of the $a$–$t$ graph has area $a\,\Delta t$, the small change in velocity during that sliver of time; adding up the strips gives the total change.
$a(t) = 6 - 2t$. The shaded area from 0 to $t$ is $\Delta v = 6t - t^2$ (in m/s). After 3 s the area starts to subtract.
✏️ Worked example: Velocity from acceleration
A cart has $a(t) = 6t - 4$ (m/s², s). At $t = 0$ its velocity is $2\ \text{m/s}$. Find $v(t)$ and $v(2)$.
Antidifferentiate: $v(t) = 3t^2 - 4t + C_1$.
At $t = 0$: $v(0) = C_1 = 2$, so $v(t) = 3t^2 - 4t + 2$.
Dropping the constants of integration. If you write $v(t) = 3t^2 - 4t$ for the cart, you have silently assumed it started from rest; the 2 m/s it already had disappears, and every later velocity and position is off. Check: substitute $t = 0$ into your $v(t)$ and $x(t)$. You must get back the starting velocity and position.
✏️ Worked example: A fading push
A car starts from rest at $x = 0$ with $a(t) = 4e^{-t/2}$ (m/s², s). How fast is it going at $t = 4\ \text{s}$?