Yes it will, but you'll hardly ever notice it.
Imagine a PHP script with such a loop:
The script will never be parsed until its end. But after
max_execution_time minutes, it will be stopped.
For the second option, imagine a file hoster where you're gonna upload a movie you made (think of 10 GB). With a slow internet it will take you years to transfer this file, but after
max_input_time minutes, the transfer will be cancelled (doesn't have to be a file, can be everything your computer sends to a server).
If a memory limit is set, a script won't use more than that amount of RAM.
For example, I wrote a file decoder for a file i found in a game, and because it was so big (1.5 GB extracted) and the scripts reads it all at once, puts it into variables, decodes it, and only then saves it, 512 MB weren't enough and I got an error.
Greetings
Molt