Defining inertial and non-inertial reference frames This is not the first time I am studying classical mechanics but the idea of reference frames has always confused me, more so after studying a bit of relativity. I'd really like it if you could clear this up for me once and for all.
Consider a frame $S'$ moving at a velocity $v$ w.r.t a frame $S$ at a certain instant, such that $S'$ is also accelerating w.r.t $S$, its acceleration being $a$. Also, let $S$ be a frame that is at rest w.r.t me. 
Let $u_x,u_x'$ be the speeds of an object in $S$ and $S'$ respectively. Then obviously $u_x'=u_x-v$. Differentiating this we get $a_x'=a_x-a$. Clearly, acceleration is relative. 
If that is the case, then I don't see any point in defining inertial and non-inertial reference frames, because acceleration being equal to zero will be relative, which will obviously mess up all the formulations of the theory. 
I've tried again and again to grasp this concept but I feel that things somehow just don't add up. Please help me.
 A: The key for understanding non-inertial frames is to recognize that there are two distinct concepts of acceleration.

*

*Coordinate acceleration This is the second time derivative of position. This is the concept of acceleration that you used in the question. As you correctly reasoned, coordinate acceleration is relative so different frames will disagree on its value.


*Proper acceleration This is the acceleration measured by an accelerometer. All frames can look at the accelerometer and see what it reads, so all frames agree on the value of proper acceleration. In other words, proper acceleration is not relative.
So in relativity the concept of an inertial frame is clear: an inertial frame is one where all objects with zero proper acceleration also have zero coordinate acceleration. Conversely a non-inertial frame is one where some objects with zero proper acceleration have non-zero coordinate acceleration (or vice versa).
In Newtonian physics the distinction is a little more complicated because gravity is considered a real force, but it is not detected by an accelerometer. So you have to compensate for the gravitational acceleration in your definition of an inertial frame. But that is straightforward once you use Newton’s law of gravitation to determine the gravity field everywhere. Alternatively you can use Newton-Cartan gravity which takes the relativistic approach to non-inertial frames.
For both cases, you wind up a clear distinction between inertial and non-inertial frames. Each frame can determine if it is inertial or not unambiguously and without reference to any other frame.
A: The Principle of Relativity says

Special principle of relativity: If a system of coordinates K is chosen so that, in relation to it, physical laws hold good in their simplest form, the same laws hold good in relation to any other system of coordinates K' moving in uniform translation relatively to K.


The general principle of relativity states:
All systems of reference are equivalent with respect to the formulation of the fundamental laws of physics.

In your case, the Newton's laws will be different in different frames of reference: in non-inertial frames they will contain frame-specific acceleration.
A: The laws of nature/physics have the same form in any inertial reference frame, maybe "the simplest" (do we all agree on the meaning of the word "simple"? And on the value of "simplicity"? I guess not) form, maybe not, but they have the very same form in all the inertial reference frames (do we all agree that two equations are the same? I guess so).
To me, it's a pretty valid reason to define inertial frames, and then to test if we're in, or we're using, an inertial reference frame.
See @Dale's answer for an operational definition of an inertial frame.
