When is it necessary to use "float" instead of "int"?
An integer is a whole or natural number.  Computers use integers for counting and comparisons.  Computers can count precisely using integers and comparisons of two integers can be absolutely true or false.

To make a float or floating-point number, a computer uses two integer numbers.  It uses one integer as the mantissa and the other as the exponent.  Computers use floats for calculations involving very large, very small or fractional values.  In other words the set of real numbers.  Computers can not count very well using floats.  Computer can not even compare two floats very well. That is to say, you may get different results from different computers when testing if two different floats are the same or not. This is due to rounding error.  

Consider that the set of real numbers between 0 and 1 to be infinite.  However, intuitively, we know computers can not keep track of an infinite number of unique values between 0 and 1.  After all, computers use a float to do this and a float has a finite number of bits in it's mantissa and exponent.  The difference, if any, between the actual real number from, say, a calculation and the next possible float value is commonly referred to as the roundoff error.  In a program, a difference, for example, in the order of operation is enough to cause different roundoff errors to occur resulting in two slightly different float value results.

Rounding errors are what we end up with for allowing float values to grow very large or very small or to contain factional amounts.  Fortunately, floats are exactly what we need when computers are asked to calculate very large, very small or fractional numbers.

In embedded programming we rarely use floats.  They take up more of our limited RAM space than integers.  And it is rare that we need to calculate very large or very small numbers.  Usually, in embedded programming, we are counting events or measuring sensors.  Usually integers are preferred or are sufficient for our purposes.

Addressing your specific application (pedometer):

It is anticipated you would prefer to track distances in miles.  And it is practical to assume a good pedometer displays factional miles.  You can use floats to calculate this value.  A rigorous programmer would cast their integers as floats when mixing them in equations to make it clear to the compiler what is desired.