One of the other answers has provided a nice link to the Wikipedia entry for baseball metaphors for sex. There are, as the top comment on this question notes, four bases in baseball, and these have corresponding sex acts associated with them.
The sexual contact associated with each base has evolved dramatically since I was a teenager, although "home base" or "home run" has always meant intercourse, and "first base" has always meant kissing or snogging.
To use the expression correctly, you get or make it to a base, per my comment:
I got to second base with that girl yesterday.
I didn't think I had a chance, but I made it to third base with her last night.
You don't use "hit" with "bases," but you can use the baseball terms that correspond to hits:
I hit a triple when I took her home last night.
means to get to third base. It's double for second base, single for first base.
You can also "score," which is the same as hit a home run or get to home base.
About the House quotation, if I interpret it correctly, they had intravaginal sex twice and then she performed oral sex on him. If we say home base = fourth base, that's 4 + 4 − 3 = 5, the subtraction because he was receiving instead of giving. But this is a joke, and probably not intended to be analyzed too closely.
And here's another handy diagram.