From your question, I believe that you are looking for what these mean in accounting terms and not the difference between a debit and a credit card.
I'll deal with purchase and sale first as this is easier. They are the same thing seen from different points of view. If I sell something to you then I have made a sale and you have made a purchase. Every sale is a purchase and every purchase is a sale.
Debits and Credits are accounting terms and refer to double column accounting (the most common accounting system used). The way a set of accounts works is, accounts are set up under the following broad headings:
- Assets (what you have)
- Liabilities (what you owe)
- Equity (what you own)
- Income (or Revenue)
- Cost of Goods Sold
- Expenses
The first 3 appear on the Balance Sheet, so called because the accounts balance (Assets = Liabilities + Equity). This is always a "point-in-time" snapshot of the accounts (1 June 2015).
That last 3 appear on the Profit and Loss sheet, Profit (or loss) = Income - Cost of Goods Sold - Expenses. This is always an interval measure (1 July 2014 to 30 June 2015). Changes in these accounts flow through to the Equity part of the Balance Sheet.
When you enter a transaction the Debits always equal the Credits, they are simply applied to different accounts.
Debits increase Assets, Cost of Goods Sold and Expenses and decrease Liabilities, Equity and Income.
Credits do the reverse
For your examples:
1. a customer buy something from me, what is the debit and credit?
I will assume they pay $1,000 and the thing cost you $500
Your cash (asset) goes up by $1,000 (Debit), your inventory (asset) goes down by $500 (Credit), your Sales revenue (income) goes up by $500 (credit).
This gives you a profit of $500.
2. a customer buy something of worth 1000 but gives me 500 what is
debit and credit
Your cash (asset) goes up by $500 (Debit), your debtors (asset) goes up by $500, your inventory (asset) goes down by $500 (Credit), your Sales revenue (income) goes up by $500 (credit).
This also gives you a profit of $500.
3. if I buy a product from supplier worth 1000 and pay equally what is credit and debit
I assume you mean pay cash:
Your cash (asset) goes down by $1000 (Credit), your inventory (asset) goes up by $1000 (Debit).
There is no profit or loss here - you have swapped one asset (cash) for another (inventory).
4. if I buy a product from supplier worth 1000 and don't pay what is credit and debit
Your creditors (liability) goes up by $1000 (Credit), your inventory (asset) goes up by $1000 (Debit).
There is no profit or loss here - you have gained an asset (inventory) but incurred a liability (creditors).
The reason for confusion is that most people only see Debits and Credits in one place - their bank statement. Your bank statement is a journal of one of the banks liability accounts - its their liability because they owe the money to you (even loan accounts adopt this convention). Credits happen when you give money to the bank, they credit your account (increase a liability) and debit their cash balance (increase an asset). Debits are when they give money to you, they debit your account (decrease a liability) and credit their cash balance (decrease an asset) . If at the end of the period, you have a credit balance then they owe money to you, a debit balance means you owe money to them.
If you were keeping a book of accounts then your record of the transactions would be a mirror image of the bank's because you would be looking at it from your point of view.