An easy way to do this is to buy a powerful power supply (in regards to your previous question) like this one: 5V DC 3A power supply and either cut off the barrel plug - leaving you with a + and a GND wire (which is which you can easily determine with a voltmeter or by looking at the polarity of the plug and how it's wired). You then connect the positive +5V wire both to your PI (one of the 5V pins on the GPIO header, i.e. pin 2 or 4) and your relay board, and the GND wire to one of the many GND pins on the Pi as well as to the GND of the relay. Note however that doing this means the Pi and the relay board are linked in circuit and not fully electrically isolated, which defeats the purpose of the optocoupler on the Sainsmart relay board I referred to in my answer to your previous question.
If you want to full separate the two circuits, you keep your original USB wall wart for the rPi, and you get a separate supply for the relay board and pump. In this case, don't connect the separate supply's GND to the rPi's ground - the optocoupler ensures the two circuits are fully separated. Oh, and get yourself a primer on electronics, I can recommend Forrest Mims' handbook as a quick but thorough read.
EDIT: You might be able to power your relay & pump through the GPIO 5V pin if you buy a powerful enough USB 5V power supply for your rPi (would need to be 3A or more at least if this is for a B(+), 4A for an rPi 2) - the 5V supply has a 2A polyfuse which sets the upper limit for the current provided. Check this forum post on raspberrypi.org for more details. But be careful - you could pull too much current for the rPi to keep running reliably, and, as with everything electronic, take care in testing your setup step by step to avoid making a costly mistake (read: fry your rPi). Especially when working with the 5V GPIO pin it is easy to accidentally short it with another pin, potentially causing damage to that pin or the entire processor.
EDIT TWO: Got myself a bit mixed up there in all the options, but basically you have 4 things to provide power to:
- The rPi (typically powered via USB)
- The opto-coupler on the board using the 4pin header's VCC - typically powered using the 5V (or 3V3 volt) pins on the GPIO header
- The relays (either powered from the same 5V supply as the opto-coupler when you put the jumper across the 3-pin header's VCC and JD-VCC, or separately powered by removing that jumper and supplying 5V to JD-VCC, the latter would fully isolate the GPIO pin from the relay)
- The pump itself - my answer above shows how you can do this with a separate or joint 5V power supply, but you could just as well use a 12V supply or 9V supply if you have those handy. This power supply gets its positive wire attached to the middle screw terminal of the relay, and either the left or the right terminal (but not both) go to your pump.
You would need a common ground between 1&2, and if you leave the JD-VCC/VCC jumper in place, you would need to also need a common ground for 3. #4 can be independently grounded.
Check this link on raspberrypi.org for a lengthy discussion on how to set up such a relay board: https://www.raspberrypi.org/forums/viewtopic.php?t=19222