
Mark H. answered 04/13/19
Tutoring in Math and Science at all levels
There is no difference in the two cases:
two magnets will either repel each other, or attract each other, depending on how the poles are aligned.
In one case, it takes energy to push them together, and--in the other case--it takes energy to pull them apart.
This is loosely analogous to springs, which can be either tension or compression. Either one has a "rest state", defined as its configuration with no force applied. Energy is required to move either one out of its rest state.