I think your problem is not with the physics, but with the mathematical notation.
First let me briefly explain the physics. The quantity of interest to us, is the distance s(t), which tells us at any time t where at which distance s of some reference point s = 0 we can find some object (particle, cart, ball, ...).
The velocity is the quantity that tells us how fast the object moves from one point to another. It is introduced as a displacement per time interval (v = s / t) which works fine if the displacement is of the same magnitude in any time interval. But if it's not, then we should do something like v(t, t + \Delta t) = \Delta s / \Delta t where \Delta t is some small time interval after t, and \Delta s is the displacement in the interval between t and t + delta t. In the limit where t goes to zero, we get the "instantaneous" velocity v(t) and the fraction turns into the derivative ds/dt. Note that although the notation is very similar, the procedure is really non-trivial (a mathematical limit is involved): whereas \Delta s / \Delta t really is one number divided by another, ds/dt is not a fraction. "ds/dt" stands for a single object, a function which can be obtained from s(t). If this notation confuses you, I suggest that you write s'(t) instead (the prime indicating derivative w.r.t. t).
Similarly, the acceleration tells us how fast the velocity is changing, so a(t) = v'(t). In the other notation, a(t) = dv(t)/dt = (d/dt) v(t), but again, there are no fractions in that expression - it means the same as v'(t). The quantity a(t) is important, because it governs the motion of the object: if we know what forces act on the object, we use F = m a to find the acceleration of the object at any time instant, from that we can determine the velocity (which mathematically is just an anti-derivative of a(t): a function whose derivative is equal to a(t)) and from there our target function s(t) (in the same way).
If you substitute v(t) = s'(t), then you get a(t) = (d/dt) s'(t), the derivative of the derivative of s(t). So to avoid this mix of notations, let me just write a(t) = s''(t). So if we write
s'(t) = \frac{ds}{dt}
is there also some notation for s''(t)? Obviously,
s''(t) = \frac{d}{dt} \frac{ds}{dt}
which just expresses that s''(t) is the derivative of (ds/dt) with respect to time. But to avoid writing things like
s''''(t) = \frac{d}{dt} \frac{d}{dt} \cdots \frac{d}{dt} \frac{ds}{dt}
we shorten the notation to
s''(t) = \frac{d^2 s}{dt^2}
Note that the "square" (which is actually not a square, just a superscript 2) goes with the d above, but with the t below.
Now again, this is not a fraction. You cannot do something like
s''(t) dt^2 = d^2 s
or cancel some variables to get
s''(t) = \frac{ds}{t^2}
-- the whole thing (with the fraction notation and the squares and all included) is a single object and should be treated as such. The only thing that we are allowed to do, is to write it as
s''(t) = \frac{d^2}{dt^2} s(t)
which allows for longer expressions than s(t) to be written down directly. For example, suppose that s(t) = A cos(x - 3t) + B sin(x - 3t), we could write
a(t) = s''(t) = \frac{d^2}{dt^2}\left( A \cos(x - 3t) + B \sin(x - 3t) \right)
directly.