Can arc length be a straight line? Sorry for off the beaten path question.  Struggling to know how integration can distinguish between a length and an area so I will frame the question in a peculiar manner.  
I have a line  $y = x.$  and $x = 5$.  Is the arc length $5?$  From $0$ to $5?$ Is the area $25?$  Let's use integration.  How can you tell the difference between arc length and area? If a straight line is not an arc length the question still holds: how do you keep the dimensions synchronized so one is a square giving area and the other a simple length ? 
 A: The easiest way to distinguish is to look at the integrals once you've assembled them, and do dimensional analysis. Here's the rule for dimensions using the two main calculus operations of differentiation and integration. A word about notation: $[x]$ means "the units of $x$".
\begin{align*}
\left[\frac{dy}{dx}\right]&=\frac{[y]}{[x]} \\
\left[\int y\,dx\right]&=[y]\,[x].
\end{align*}
This ought to be taught in every single calculus course, but alas, it seems to be vastly neglected. 
So let's take two examples: an arc length integral, and an area integral - the area integral first because it's more straight-forward. 
Example 1: We want the area under the curve $y=x^2$ from $x=0$ to $x=2$. Let's say we're measuring both $x$ and $y$ in meters. No problem: 
$$A=\int_0^2y\,dx=\int_0^2x^2\,dx=\left(\frac{x^3}{3}\right)\bigg|_0^2=\frac83.$$
What are the units? Using the rule from above, $[A]=[y]\,[x]=\text{m}\cdot\text{m}=\text{m}^2$, so it's an area. Don't be confused because $y=x^2$. The units of $y$ are still just meters. 
Example 2: We want the arc length of $y=x^2$ from $x=0$ to $x=2$ (hopefully this should look familiar). The formula is
$$L=\int_0^2\sqrt{1+\left(\frac{dy}{dx}\right)^{\!\!2}}\,dx.$$
Let's check out the units according to our rules above:
\begin{align*}[L]&=\left[\int\sqrt{1+\left(\frac{dy}{dx}\right)^{\!\!2}}\,dx\right]\\
&=\left[\sqrt{1+\left(\frac{dy}{dx}\right)^{\!\!2}}\,\right][x]\\
&=\sqrt{\frac{[y]^2}{[x]^2}}\,[x]\\
&=\frac{[y]}{[x]}\,[x]\\
&=[y].
\end{align*}
Here, you'll notice we assumed that under the square root symbol, the units of the $1$ match $[y]^2/[x]^2$, or else we couldn't have done the addition. You can only add things together that have identical units. In any case, we wound up with units of length: $[y]=\text{m}$, so this result is a length, not an area. 
A: Integration is the art of summing lots of small things. In the case of "area under the graph" you're summing up the areas of many small regions. In the case of arc-length, you're summing up the lengths of many short segments.
You know which one you're doing when you're setting up the integral, and when you interpret the result, but the actual calculation between those two steps doesn't really care one way or the other.
A: This is a supplementary answer to Bill Wallis' comment to really flesh out the idea. Informally, we can reformulate the task of finding arc length into some infinitesimally small lengths. If we zoom in on a small section of a function's graph, we can see that the section of the graph somewhat resembles a triangle:

Source. 
You can see that with some small step in $x$, $\mathrm dx$ a corresponding step is $y$, $\mathrm dy$ is created. By using the Pythagorean theorem, we can find the hypotenuse, a rough approximation of the curve itself. And with integration, we want to sum an infinite number of these minute hypotenuses to create an exact measurement of arc length.
As it turns out, the area under the graph of $\sqrt{\left(\mathrm dx\right)^2 + \left(\mathrm dy\right)^2}$ is the arc length of the original curve as Bill Wallis describes. We have created a function whose area under its curve gives us the arc length of the original curve. Thus another intuition for the use of the integral in the task of arc length finding.
If you go further, you can observe that if we are finding the arc length with respect to $x$, we find $\mathrm dx$ and $\mathrm dy$ with respect to $x$. This leads us to the following formulas usually presented to students:
$$\text{Arc Length w.r.t } x = \int_a^b \sqrt{\left({\mathrm dx\over \mathrm dx}\right)^2 + \left({\mathrm dy\over \mathrm dx}\right)^2} \,\mathrm dx = \int_a^b \sqrt{1 + \left({\mathrm dy\over \mathrm dx}\right)^2} \,\mathrm dx$$
$$\text{Arc Length w.r.t } y = \int_a^b \sqrt{\left({\mathrm dx\over \mathrm dy}\right)^2 + \left({\mathrm dy\over \mathrm dy}\right)^2} \,\mathrm dy = \int_a^b \sqrt{\left({\mathrm dx\over \mathrm dy}\right)^2 + 1} \,\mathrm dy$$
A: As per my comment, integration always gives you the "area under the curve" between the two points of evaluation. With the formula for arc length, the formula has been written in such a way that the "area under the curve" (that is, the curve that you're integrating) is equal to the arc length --- you don't integrate the arc curve itself, but instead you integrate some other curve that tells you how long the arc in question is.

Consider the 'curve' given by $y = x$. Suppose the 'arc length' is wanted from $x = 0$ to $x = a$ where $a$ is some positive real number. By drawing this out, you can easily see that the length of the 'curve' between $x = 0$ and $x = a$ is $a\sqrt{2}$ by using Pythagoras' Theorem. Another way to have found this value could be with the following integral:
$$
\int_{0}^{a} \sqrt{2} \,\,\mathrm{d}x.
$$
This integral gives the area under the curve $y = \sqrt{2}$. This is clearly a different curve to above. However, the integral gives the value $a\sqrt{2}$, which is the area under the curve $y = \sqrt{2}$, but it is also the length of the arc $y = x$ between $x = 0$ and $x = a$.
We integrate something that gives us an area, but that area corresponds to the length that we want.

If you've done an statistics, this is similar to a Cumulative Density Function (CDF) that gives you an area when you plug in one value, with this CDF corresponding to some Probability Density Function (PDF).
