In a word, poorly.
At least on any machine I ever used or heard of, you did not feed cards one at a time though. There were automated card readers that would feed and read hundreds of cards a minute (probably around 1000/minute, but I'm not sure of the exact specs).
In a typical case you wrote the code by hand, then punched it onto cards. Each card holds one line of code (up to 80 columns). You took the card deck to be executed. Depending on backlog, anywhere from an hour or so to a day or so later, you got your deck back along with a printout of the results.
I should probably add: since your card deck ran as a job, you didn't just submit the code for the program itself -- you had to write something vaguely similar to a batch file/shell script with the directions to compile and execute your code. IBM JCL (for one example) remains heavily influenced by its Hollerith-card origins.
Another minor point: on most systems I remember, you normally included a line number on each punch card. You obviously avoided dropping a deck if you could, but when (not if) one got dropped, it wasn't really nearly the tragedy many imagine. Interesting side point: at least the card sorters I saw used a radix sort -- they'd separate the cards into 10 bins, based on one digit of the line number, then "merge" those together (drop all the cards into a single bin in order) then repeat as many times as you had digits in the line numbers.
Hollerith cards were extremely influential -- 80 columns as a limit still survives to an almost disturbing degree. At least on the Control Data mainframes, things like the file system were influenced quite heavily as well. Well after Hollerith cards were mostly gone, remnants of them were visible in the OS -- for example, text files were often stored as a series of 80-character records, regardless of how few/many characters a line actually contained. I can still remember my surprise at the "backwardness" of a system like Unix where you had to read all the preceding lines to find line N of a text file, instead of just being able to seek to it directly.