Use this expression to talk about something that you were planning to do next. For example, at work:
A: Hey, are you busy?
B: Actually, I was just about to leave. What do you need?
This expression is useful in situations where you're a little bit late doing something:
A: Hey, can you send me those sales projections?
B: Yes, sorry. I was just about to do that.
This makes it seem like you were already planning to send them soon, even if this person didn't remind you.