This is how you pay for a meal:
1. Towards the end of the meal, usually the waiter will come by an ask if you want to order dessert. If you do order dessert, then after dessert they will normally bring you the check and leave it on the table. If you don't want dessert, and are ready to leave, you can just ask "Can we have the check?"
2. When they do bring the check, they will either leave it on the table or hand it to you directly, and then they leave. If you are paying in cash, you just have to place the cash in the folder and leave it on the table (I leave it on the edge of the table, which signals to them that you left payment). You should also leave a tip (15-20%).
If you need change, you just put the cash in the folder. When they pick it up and take it to the back, they will automatically bring you your change back.
Once you leave the payment and tip, you do not need to wait for them. You only need to wait if you need change.
And next time pay attention to when your parents pay!!!