In order to play "by chords," meaning from a lead sheet (melody line and chord symbols) or a chord chart (chord symbols only), you need a thorough knowledge of what notes belong in each chord, and you need a vocabulary of patterns you can play with these notes. Since little or none of what you will play is written down, it is called improvisation. We have several good books on various aspects of this topic:
Creative Keyboard's Complete Book of Improvisation, Fills, and Chord Progressions illustrates chords, scales, fills, and more. For playing from a lead sheet (where the right hand plays the written melody), you will be most interested in chapters 7, 8, and 9 on left hand patterns in various time signatures. The left hand pattern may be as simple as playing a chord arpeggio (broken chord). For the C chord, which is C-E-G, you can play quarter notes C-E-G (in 3/4) or C-E-G-E (in 4/4). One of my favorite patterns for faster music is to play alternating octaves with the fifth, i.e. C (octave), G, C octave, G. Generally, you can use one pattern for a whole song or you can throw in a different one once in a while for variety, or if the tempo or time signature changes.
Once you have these patterns going in the left hand with the melody in the right hand, try adding some chord tones below the melody in the right hand. For instance, if the chord is G (G-B-D) and you are playing a G in the melody, you can also play the D below it, as well as the B (if you can reach it).
More info on this book
If you also need to improvise a right-hand melody, look at Mel Bay's Complete Book of Improvisation, Fills & Chord Progressions.
This book assumes that you have a chord progression written out and you want to improvise a melody over it from scratch, as in jazz or blues music.
More info on this book
Another helpful book, even though it is not written specifically for piano but applies to all melody instruments, is Peter Spitzer's Jazz Theory Handbook. This book gets into chord building, harmonic movement, licks (short melodic fill patterns), and more on improvisation.
More info on this book
If you have nothing written to work from, my best suggestion is to look at You Can Teach Yourself Piano by Ear. This Book/CD/DVD set helps you to play songs without music.
More information on this Book/CD/DVD set