conservative and non-conservative forces
Conservative and non-conservative forces
Conservative force
In nature there are certain forces, that of gravity, for example, which have a very remarkable property which we call "conservative". If we calculate how much work is done by a force in moving an object from one point to another along some curved path, in general the work depends upon the curve, but in special cases it does not. If it does not depend upon the curve, we say that the force is a conservative force.
A conservative force is a force with the property that the total work done by the force in moving a particle between two points is independent of the path taken. That is, the work done by a conservative force is the same for any path connecting two points: \[W_{AB,\text{path1}}=\int_{AB,\text{path1}}\vec{F}_{\text{conservative}}\cdot d\vec{s}=W_{AB,\text{path2}}=\int_{AB,\text{path2}}\vec{F}_{\text{conservative}}\cdot d\vec{s}\].

An equivalent saying would be: if a particle travels in a close loop, the total work done by a conservative force is zero, i.e. \[W_{\text{closed path}}=\oint \vec{F}_{\text{conservative}}\cdot d\vec{s}=0\]. This is because any two random paths form a closed path, and since both paths must take the same amount of work done between the same initial and final points, their difference equals the work done around the closed loop, which is zero.
Mathematically, for any conservative force \[\vec{F}_{C}\], \[\Delta U=-W_{C}\], where \[\Delta U\] represents the change in potential energy associated with the force. The negative sign provides the convention that work done against a force field increases potential energy, while work done by the force field decreases potential energy. In other words, work done by field, \[W_{\text{field}}=+\int \mathbf{F}\cdot d\mathbf{s}=-\Delta U\], while work done by external agent, \[W_{\text{external}}=-\int \mathbf{F}\cdot d\mathbf{s}=\Delta U\]. Additionally, when we're expanding the dot product, \[\mathbf{F}\cdot d\mathbf{s}=F\,ds\,\cos\theta\], \[\theta\] is the angle between the force and the direction of the tangent to the integration path.
A simple example would be lifting a ball. When we lift a ball vertically, the gravitational potential energy of the ball, with respect to the Earth-ball system increases by \[mg(y_{2}-y_{1})\]. Equivalently, the work done by gravity is \[-mg(y_{2}-y_{1})\], as the direction of gravitational force is opposite of the ball, i.e. \[\cos 180^{\circ}=-1\]. It can also be said that since we're doing work against a force field (lifting the ball against the gravitational force field), we're increasing the potential energy of the ball exactly because gravity's work is negative.
Non-conservative force
A simple example of a non-conservative force is frictional force. Naturally, the work done depends not only on the starting and ending points, but also on the path taken.
Additionally, potential energy can't be defined for non-conservative forces as if we try to define a potential energy with respect to some position, it would not be unique as the work done to move from one position to another would depend on the path taken.