If the cache on a computer is direct-mapped, it means that every block (chunk) of data in main memory will be mapped to exactly one particular block in cache. The size of every main memory block is equal to the size of every cache block.
Since the cache device is smaller than RAM, it means that cache contains fewer blocks than RAM does. For example, RAM might contain $2^{10} = 1024$ blocks of data, while cache contains only $2^4 = 16$ blocks of data.
This means that multiple of RAM blocks will map to the same cache block: only one of these RAM blocks can be located in the cache block at any given time. Moreover, to know to which cache block a specific memory block is mapped, we need to do the following calculation: $n \mod c$, where $n$ is the RAM block for which we are checking, and $c$ is the total number of cache blocks. That is, the remainder of the division $\frac{n}{c}$ is the number of the target cache block.
Example: If RAM has $16$ blocks, while cache has $4$ blocks, then RAM blocks $0, 4, 8, \text{ and } 12$ are mapped to cache block number $0$; RAM blocks $1, 5, 9, \text{ and } 13$ are mapped to cache block number $1$; RAM blocks $2, 6, 10, \text{ and } 14$ are mapped to cache block number $2$; and RAM blocks $3, 7, 11, \text{ and } 15$ are mapped to cache block number $3$.