Say you get a credit card on the first of January with a credit limit of £2,000.
You can use it exactly like you'd use your debit card but instead of the money coming from your bank account it's paid by the credit card company and racked up as a debt to you. The card company charges the shops a small sum for administration and this is part of how they make their profit.
On 31st January the credit card company sends you a bill for all the spending you've done on it. If you repay the full amount by 15th February then you don't pay any interest. If you don't repay in full then you pay interest (normally around 35% per year for a standard credit card I think?).
Advantages of having a credit card:
You have additional consumer protections if the company you're buying from lets you down or goes bust taking your deposit with it.
There's an additional layer of protection between fraudsters and your bank account.
If anything goes wrong with your bank account (technical issues, fraud) you have an alternative means of payment immediately available.
Some credit cards, (Halifax Clarity leaps to mind) are extremely effective ways of spending overseas because they don't charge extra foreign currency transaction fees.
Some credit cards give you a small percentage of cash/vouchers back on your spending so if you always pay them off in full you make a small profit.
If you do need more money than you have available in your bank account in an emergency, eg for a car repair or a broken washing machine, it's an instantly available form of credit. If you know you're not going to be able to repay it when the bill becomes due you can potentially use it and then use the time until the bill becomes payable to take out cheaper credit to repay the bill.
Disadvantages of credit cards
Depending on your personality you may find their ease of access tempts you into unnecessary serious debt.
They're not the cheapest form of credit: they're cheaper than payday loans but more expensive than a bank loan.