Emilio was pretty much onto it with the integration. I’d like to expand on that.
Consider an object. It has some number of kilograms of mass, and it has moved some number of meters of distance. The product of these two numbers (in $kg\:m$) is the sum of the object’s momentum at every instant during transit. As if you were tracking its momentum and keeping a running total.
Such a continuous sum is just an integral.
You can take a sum and divide it by a count to get an average; when you divide by the number of seconds that the object was travelling, you get its average momentum for that period. Your result is in $\frac{kg\:m}{s}$, which is the familiar unit of momentum.
A Joule is a newton-meter, that is, $\frac{kg\:m^2}{s^2}$. The combined units in the numerator $kg\:m^2$ make you think “mass-area”, but in reality the kilograms, the metres, and the other metres are all separate quantities. Divide them by seconds, and you get angular momentum, or action. Divide again, you get force. Divide yet again, and you get force onset rate. Or separate force into a product of momentum $\frac{kg\:m}{s}$ and velocity $\frac{m}{s}$.
Since multiplication is commutative and associative with units, there are often many equally valid intuitive models for a given combination of units. Go with what works for you or the problem at hand, and always be ready to see things another way.