If you read through the tutorials that I linked to, it will explain how to accomplish this.
The idea is that when the Order is placed, a record is stored in the orders table. when the record is stored in the orders table, the loged in users ID is stored in the user id column of the orders table. This is a foreign key that relates the order to the user that placed it.
on the order history page, a query is created to return order information for that particular user, using the user id session variable.