Mr.Xenotype answered your question well but missed one little part.
Does it have something to do with POST method?
No, it deals with the GET method. As he stated, it's pretty much to make the URL look "pretty", and it could actually be a crucial part of a RESTful API (bit advanced for a beginner) if that's how the site was designed.
http://www.fruit.com/example.php/red
Is the same as
http://www.fruit.com/example.php?id=red
Some tinkering with the .htaccess file is required to accomplish this using what are called regular expressions, or REGEX. If you'd like to know more I'll gladly provide some examples.
Adding a "RewriteRule" to the .htaccess file (a server configuration file) can allow the server to change the way the server files/folders are accessed
//probably what the rewrite looks like of the example you provided
RewriteRule .* example.php/$0 [L]
RewriteRules are broken into 4 blocks: action, pattern, rewrite and flag
Action: RewriteRule, essentially just lets the server know we're going to be performing a rewrite
Pattern: .* is our pattern in this example. The "." stands for any character, meaning match any character, and the "*" tells it to repeat this. So, match any character after the rewrite.
The rewrite is the page to perform this on, so example.php is the rewrite. The "$" of this tells it where to start the rewrite. So, we'll start the rewrite at the "$" symbol, and use our pattern. Our pattern ".*" tells us to match any character, in this case, red.
The [L] means last rule. This is it, no more rules to follow. You can use multiple rewrite rules for multiple pages.
So now, instead of using example.php?id=red, the server now knows that starting after "example.php/" to match any characters we supply.