Let's make this very easy to understand for you.
1) Open Petty Cash account (under Bank Type in the Chart of Accounts)
2) Transfer money from bank account to Petty Cash account. This means you've $1,000 balance in Petty Cash and $1,000 less in bank account
3) You've used $800 from Petty Cash for some items. Expense it from Petty Cash A/C. Now, you've $200 left in this account.
4) Deposit $200 back to the Bank account from Petty Cash. Now, you've ZERO balance left in Petty Cash account.
Hope this helps!