It's a common use of Apache's
mod_rewrite module. The idea being you set up a range of regular expression rules in an .htaccess file, and these rewrite rules map to different files on the server (also allowing you also to pass through data matched by your regular expression).
So, for example:
RewriteRule ^user\/([a-z0-9\-]+)$ user.php?username=$1
Some examples of URLs matched by that rewrite rule might include:
http://example.com/user/artificial
http://example.com/user/stapled
http://example.com/user/matt-smith
http://example.com/user/matt-smith-1
When a match against that URI is found, Apache internally maps the request to user.php and passes our matched text through within the query string (so you could retrieve the username with $_GET['username'].
So for a marketplace item, you could have an htaccess file of:
RewriteEngine On
RewriteRule ^marketplace\/itemdetail\/(\d+)$ marketplace.php?itemdetail=$1
And http:// example.com/marketplace/itemdetail/123 would get mapped to marketplace.php
Though most modern frameworks these days will set up a blanket rewrite rule, which maps every URI to a single entry point. Something like:
RewriteRule . index.php
And they'll leave it up to their application to determine what they want to do with the request. However, if it's only a small application, you can probably get away with creating individual rewrite rules

. If you're interested in this sort of stuff though, you'll probably want to read up on MVC architecture in your free time, and have a go at a PHP MVC framework. If you do, I highly recommend having a look at
Yii. If you use it enough you'll fall in love with it.