a little exercise that helped me learn how to do this very thing (which is broadly referred to as "voicing") is to play a big fat c major chord, both hands simultaneously (C E G C E G C), and repeat it at a regular rhythm, nice slow quarter notes or the like, and very softly (ppp).
now stop and without moving your hands, play a c maj arpeggio up and down a few times until you can play it nice and smoothly and at exactly the same speed as before, but very loudly (fff). your fingering does not change at all.
finally, do the two things simultaneously. if you do it right, you'll still be able to hear the arpeggio through the chord. it takes some time and practice though. to me, voicing is one of the biggest challenges of playing well (going beyond just striking the notes to actually sounding good). eventually you'll get to much bigger challenges such as playing a melody that is shared between two hands, or playing melody and accompaniment in the same hand.
let me know if the above makes sense. it's a lot easier to just show at the piano than to explain in words.