On the top edge of your 3GS is the headphone port and lock button. Between those is a small slot w/ an even smaller pin hole. Place a paper clip into that pin hole and press. Some sim trays pop out easily and others require a bit more force. So, don't worry if you need to put a little elbow into it.
Quesion... is your 3GS properly unlocked to work w/ the Thai sim card?