I will explain by giving example,

-3mn +7ab - 8ab +6mn

First take like terms aside,

(- 3mn +6mn) +(7ab - 8ab )

I given bracket to understand.

First of all see the bigger number than see which sign the number has ,

In first bracket, 6 is bigger than 3 , so substract.in second bracket 8 is bigger than 7 but has negative sign so here also substract but give bigger number sign after substracting.

3mn - 1ab

I think you have understood by the given example..

e.g +8+6=14

-8 -6 = - 14

+8 -6 =2

- 8+6= - 2

Know better understood.