It modifies verbs, adjectives, or other adverbs, indicating that something is only or simply that, and nothing more.
Here are some examples:
* He merely waved hello. (modifies the verb "waved")
* It was a merely decent movie. (modifies the adjective "decent")
* She walked merely a few blocks. (modifies the adverb "a few blocks")