how do you know what to put on the debit and credit side

how do you know what to put on the debit and credit side