It's called URL re-writing. You can do that in Apache with RewriteEngine, either directly in Apache's configuration, or with .htaccess (there's really no difference). And you can do that on many other web servers (I like nginx for its performance and its ease of configuration).
When you re-write the URL, you assign the dynamic parts of the URL (in your example, whatever is after / and before the second / is one of the dynamic parts), to a variable, passed to some server side language (could be PHP, JSP, doesn't matter). Then on the server side language, this is a regular GET parameter, which you can process - read relevant data from a Database, and so on.
For example, you rewrite:
^(.*)/(.*)$ /controller.php?user=$1&page=$2 Then in PHP, the code:
echo $_GET['user']; Would print:
PewDiePie