Quick answer
acabar and terminar both mean to finish, and for a task either is fine.
acabar de + infinitive = to have just done something. Terminar never does this.
acabar / terminar + gerund means to end up doing something, and acabarse means to run out.
Side by side
Memory trick
For a finished task either verb works. For "have just", only acabar de. For running out, only acabarse.
Typical mistakes
Termino de llegar, dame cinco minutos.
Acabo de llegar, dame cinco minutos.
The "have just" structure only exists with acabar de. <i>Termino de llegar</i> reads as an odd ongoing arrival.
Acabo de terminar el trabajo mañana.
Termino el trabajo mañana.
Acabar de refers to the immediate past, so it cannot combine with a future time marker.
Check yourself
Fill in: "___ de hablar con ella hace un minuto."