Credit and debit cards are very similar other than that credit cards are protected by a federal law that limits your liability for unauthorized transactions. Therefore, it's generally best to use credit cards given a choice. That said, here are some tips for protecting both:
Put CHECK ID or SEE ID in the signature slot
Granted most people won't check this anyway, but some might. A thief can also make purchases online or at most gas stations without a signature, but there's one very important advantage here. If someone manages to get your credit card by theft or finding it (fell out of your pants or whatever), but they don't have anything else of yours, they can't forge your signature (which can make it harder to claim that the purchase wasn't yours).
Pay at the register
It only takes a few seconds for a restaurant employee to skim your card with their own personal reader or make a carbon copy impression to use later. If possible, walk the card to a register to pay.
Cross out your card number on receipts
Every time you are handed a receipt, make sure that your full card number is not listed for anyone to see. If it is, scratch it out so hard that you can't even see the impression of the numbers anymore (I usually go right through the paper).
If the store/restaurant employee complains, just remind them that printing the credit card number on a merchant copy is against federal law:
According to the federal Fair and Accurate Credit Transaction Act (FACTA), the electronically printed credit and debit card receipts you give your customers must shorten — or truncate — the account information. You may include no more than the last five digits of the card number, and you must delete the card’s expiration date.
Don't let online companies store your data when possible
The simple fact is that companies lose their customer data just a little too easily. What I do know is they can't lose what they don't have, so when shopping online always look for any options in the checkout process to not store your card/information for future use. Most online stores don't offer this yet, but a few do so be on the lookout for it.
Use Virtual Cards
If your bank has this feature, use virtual credit cards. These are one-time use numbers attached to your real credit card, but using a number that's only good under certain restrictions (like a limited number of transactions, specific time span, one-time use at only one store, etc.). This is perfect for doing business with someone while preventing them from storing your credit card number.
REFUSE to use contactless pay systems
The last thing you should have to worry about is your credit card being accessed remotely without your knowledge, but the wireless chips used in some cards make that possible. For example, the EZ-Pass system uses an RFID chip that can be read and easily copied from hundreds of feet away. Once copied, someone can go through the tolls while leaving you with the bill.
If a system doesn't require any physical contact, just proximity, then you're probably using RFID and you're at risk.