How can I fix a patio with drainage problems?
Two questions:  1) Where does the water come from? And, 2) Where else could you send it?

First thought is that you may need to do some grading and/or install some sort of french drain system to help that water run off to somewhere else... or perhaps intercept it before it gets 'cornered' if possible.  Also, those edgings around the patio appear to stand a bit above the level of the patio itself... if I'm seeing that right that can't be helping.  

Hard to say much more without a broader sense of the lay of the land.  Again, the water needs to go somewhere, and that's the first decision.

far as the low spots in the patio themselves that may just be the result of some settling if the material beneath wasn't perfectly compacted.  So you might pull up the low-lying bricks and tamp in some additional sand to get those spots up to grade.  You might also consider a narrow gutter around the edge to catch water and direct it somewhere away from your wall.  Again, much depends on the overall grading of your lot.