Learn to say NO. Know your limits. Be honest with yourself and other people and say no when you know it will be too much for you to handle.
But you could try and be a little creative to help the person to find another solution to their problem (e.g. suggest somebody else, or another quicker way of solving the problem).