How do you get URLs like below when using php?

Where it normally is written like this:

I see sites like this all the time now and am curious how this is accomplished. I do have an idea though...

When creating a directory for example photos. Do I just put an index.php file in that directory and just in my php instead of calling on a href as "?date=.$row." do I call it as "/.$row./" ?

Hope that is explained well. I guess twitter would be an example of what I am talking about. I just cannot recall the url where I specifically saw this.

If someone does know what I am talking about can they please shed some more light on it?

sweeeet im definitely going to use this!!