Question: According to Android definitions, I've found that:

* Resolution: The total number of physical pixels on a screen
* Density: Based on the screen resolution, the spread of pixels across the physical width and height of the screen.

How can I understand better the differences between the two definitions?

Answer: 
Resolution is about how many pixels you can show on screen.

Density is based on your device real size, if it's small and has a higher resolution, than the density is high cause you show more pixels in less physical space.
Resolution is a measure of how many pixels a display can show at a time eg. 640x480. Density is a measure of how big each pixel is in actual units. This relates heavily to screen size eg. 640x480 on a 15' display. 

When comparing one device's resolution to another, it's a straight-forward comparison: the higher the resolution, the more information you can display at a time. When comparing density: the higher the density the sharper the display will appear. 

If you have high resolution and low density, then your screen will be very large. On the other hand, low resolution and high density will result in a very small screen.