It might help you to realise that the vertical axis is measured as a probability density. So if the horizontal axis is measured in km, then the vertical axis is measured as a probability density "per km". Suppose we draw a rectangular element on such a grid, which is 5 "km" wide and 0.1 "per km" high (which you might prefer to write as "km$^{-1}$"). The area of this rectangle is 5 km x 0.1 km$^{-1}$ = 0.5. The units cancel out and we are left with just a probability of one half.
If you changed the horizontal units to "metres", you'd have to change the vertical units to "per metre". The rectangle would now be 5000 metres wide, and would have a density (height) of 0.0001 per metre. You're still left with a probability of one half. You might get perturbed by how weird these two graphs will look on the page compared to each other (doesn't one have to be much wider and shorter than the other?), but when you're physically drawing the plots you can use whatever scale you like. Look below to see how little weirdness need be involved.
You might find it helpful to consider histograms before you move on to probability density curves. In many ways they are analogous. A histogram's vertical axis is frequency density [per $x$ unit] and areas represent frequencies, again because horizontal and vertical units cancel out upon multiplication. The PDF curve is a sort of continuous version of a histogram, with total frequency equal to one.
An even closer analogy is a relative frequency histogram - we say such a histogram has been "normalized", so that area elements now represent proportions of your original data set rather than raw frequencies, and the total area of all the bars is one. The heights are now relative frequency densities [per $x$ unit]. If a relative frequency histogram has a bar that runs along $x$ values from 20 km to 25 km (so the width of the bar is 5 km) and has a relative frequency density of 0.1 per km, then that bar contains a 0.5 proportion of the data. This corresponds exactly to the idea that a randomly chosen item from your data set has a 50% probability of lying in that bar. The previous argument about the effect of changes in units still applies: compare the proportions of data lying in the 20 km to 25 km bar to that in the 20,000 metres to 25,000 metres bar for these two plots. You might also confirm arithmetically that the areas of all bars sum to one in both cases.

What might I have meant by my claim that the PDF is a "sort of continuous version of a histogram"? Let's take a small strip under a probability density curve, along $x$ values in the interval $[x, x + \delta x]$, so the strip is $\delta x$ wide, and the height of the curve is an approximately constant $f(x)$. We can draw a bar of that height, whose area $f(x) \, \delta x$ represents the approximate probability of lying in that strip.
How might we find the area under the curve between $x=a$ and $x=b$? We could subdivide that interval into little strips and take the sum of the areas of the bars, $\sum f(x) \, \delta x$, which would correspond to the approximate probability of lying in the interval $[a,b]$. We see that the curve and the bars do not precisely align, so there is an error in our approximation. By making $\delta x$ smaller and smaller for each bar, we fill the interval with more and narrower bars, whose $\sum f(x) \, \delta x$ provides a better estimate of the area.
To calculate the area precisely, rather than assuming $f(x)$ was constant across each strip, we evaluate the integral $\int_a^b f(x) dx$, and this corresponds to the true probability of lying in the interval $[a,b]$. Integrating over the whole curve gives a total area (i.e. total probability) one, for the same reason that summing up the areas of all the bars of a relative frequency histogram gives a total area (i.e. total proportion) of one. Integration is itself a sort of continuous version of taking a sum.

R code for plots
require(ggplot2)
require(scales)
require(gridExtra)
# Code for the PDF plots with bars underneath could be easily readapted
# Relative frequency histograms
x.df <- data.frame(km=c(rep(12.5, 1), rep(17.5, 2), rep(22.5, 5), rep(27.5, 2)))
x.df$metres <- x.df$km * 1000
km.plot <- ggplot(x.df, aes(x=km, y=..density..)) +
stat_bin(origin=10, binwidth=5, fill="steelblue", colour="black") +
xlab("Distance in km") + ylab("Relative frequency density per km") +
scale_y_continuous(minor_breaks = seq(0, 0.1, by=0.005))
metres.plot <- ggplot(x.df, aes(x=metres, y=..density..)) +
stat_bin(origin=10000, binwidth=5000, fill="steelblue", colour="black") +
xlab("Distance in metres") + ylab("Relative frequency density per metre") +
scale_x_continuous(labels = comma) +
scale_y_continuous(minor_breaks = seq(0, 0.0001, by=0.000005), labels=comma)
grid.arrange(km.plot, metres.plot, ncol=2)
x11()
# Probability density functions
x.df <- data.frame(x=seq(0, 1, by=0.001))
cutoffs <- seq(0.2, 0.5, by=0.1) # for bars
barHeights <- c(0, dbeta(cutoffs[1:(length(cutoffs)-1)], 2, 2), 0) # uses left of bar
x.df$pdf <- dbeta(x.df$x, 2, 2)
x.df$bar <- findInterval(x.df$x, cutoffs) + 1 # start at 1, first plotted bar is 2
x.df$barHeight <- barHeights[x.df$bar]
x.df$lastBar <- ifelse(x.df$bar == max(x.df$bar)-1, 1, 0) # last plotted bar only
x.df$lastBarHeight <- ifelse(x.df$lastBar == 1, x.df$barHeight, 0)
x.df$integral <- ifelse(x.df$bar %in% 2:(max(x.df$bar)-1), 1, 0) # all plotted bars
x.df$integralHeight <- ifelse(x.df$integral == 1, x.df$pdf, 0)
cutoffsNarrow <- seq(0.2, 0.5, by=0.025) # for the narrow bars
barHeightsNarrow <- c(0, dbeta(cutoffsNarrow[1:(length(cutoffsNarrow)-1)], 2, 2), 0) # uses left of bar
x.df$barNarrow <- findInterval(x.df$x, cutoffsNarrow) + 1 # start at 1, first plotted bar is 2
x.df$barHeightNarrow <- barHeightsNarrow[x.df$barNarrow]
pdf.plot <- ggplot(x.df, aes(x=x, y=pdf)) +
geom_area(fill="lightsteelblue", colour="black", size=.8) +
ylab("probability density") +
theme(panel.grid = element_blank(),
axis.text.x = element_text(colour="black", size=16))
pdf.lastBar.plot <- pdf.plot +
scale_x_continuous(breaks=tail(cutoffs, 2), labels=expression(x, x+delta*x)) +
geom_area(aes(x=x, y=lastBarHeight, group=lastBar), fill="steelblue", colour="black", size=.8) +
annotate("text", x=0.73, y=0.22, size=6, label=paste("P(paste(x<=X)<=x+delta*x)%~~%f(x)*delta*x"), parse=TRUE)
pdf.bars.plot <- pdf.plot +
scale_x_continuous(breaks=cutoffs[c(1, length(cutoffs))], labels=c("a", "b")) +
geom_area(aes(x=x, y=barHeight, group=bar), fill="steelblue", colour="black", size=.8) +
annotate("text", x=0.73, y=0.22, size=6, label=paste("P(paste(a<=X)<=b)%~~%sum(f(x)*delta*x)"), parse=TRUE)
pdf.barsNarrow.plot <- pdf.plot +
scale_x_continuous(breaks=cutoffsNarrow[c(1, length(cutoffsNarrow))], labels=c("a", "b")) +
geom_area(aes(x=x, y=barHeightNarrow, group=barNarrow), fill="steelblue", colour="black", size=.8) +
annotate("text", x=0.73, y=0.22, size=6, label=paste("P(paste(a<=X)<=b)%~~%sum(f(x)*delta*x)"), parse=TRUE)
pdf.integral.plot <- pdf.plot +
scale_x_continuous(breaks=cutoffs[c(1, length(cutoffs))], labels=c("a", "b")) +
geom_area(aes(x=x, y=integralHeight, group=integral), fill="steelblue", colour="black", size=.8) +
annotate("text", x=0.73, y=0.22, size=6, label=paste("P(paste(a<=X)<=b)==integral(f(x)*dx,a,b)"), parse=TRUE)
grid.arrange(pdf.lastBar.plot, pdf.bars.plot, pdf.barsNarrow.plot, pdf.integral.plot, ncol=2)