In the shortest terms, baseball is a game in which a person with the bat, called the batter, needs to hit the ball thrown at him by the opponent and then claim the bases spread around the pitch in succession.
The three bases and the place where the batter is standing while hitting the ball (home plate) make for a rhomboid (see the picture), and the claiming is done by touching the bases which are represented by white squares.
Speaking of sexual activity in terms of bases, sometimes doing so can make the interaction with your partner(s) seem more goal-oriented (i.e., to “hit that home run”, or “get to home base”).

Talking about fifth base when there's really only four bases reminds me of the expression Up To Eleven.
If you want to downvote me for using Urban Dictionary, that's fine. First base When you get to first base, you have been lucky enough to have been kissed.
Often, the most pleasurable sexual activity occurs when both or all partners are focused on the experience — rather than an end goal.
Another crucial piece to rounding any of the bases is making sure that you and your partner(s) have mutually consented.
The fact is that every person has heard a high schooler brag about his romantic conquest with the lines like “yeah, I totally went to second base with Michelle last you, you know it, ha-ha”: high fives his friend.
Everyone’s heard it when they were in high school, or they were eavesdropping high schoolers to see how the newer generations have faltered, or at least in a movie.
Some people only consider French kissing as getting to first base.
Second base is direct physical contact, usually meaning his hands to her breast.
Dear Alice, Some of the girls at my school talk about how their boyfriends got to first, second, or third base with them.