Well, this is pretty straight-forward.
If a user clicks on cat1, then you have that information in PHP from the $_GET array (assuming "click" means "click a link"). You know what category they clicked on, so you modify your product table's SELECT query to include a "WHERE category='{$_GET['category']}'" clause.
If the user has NOT clicked on anything, then there will be no $_GET['category'] variable set, so you display ALL the products for ALL categories.
Does that clear things up for you?
Take care,
Nik
http://www.bigaction.org/