Both products cover short-term cash needs, but they cost differently and suit different situations. Here's a plain-English comparison for South African borrowers.
If you have a credit card and pay the full statement balance by the due date, purchases are essentially free — you use the bank's money for up to about 55 days at no cost. For purchases, this beats almost any loan.
The catch: this works only for purchases (POS, online), and only if you pay the full balance, not the minimum.
Drawing cash from your credit card at an ATM is a different product. Interest is usually charged from day one (no interest-free period), and a cash-advance fee applies. For short periods of a few days, the cost can be higher than a short-term loan.
Paying only the minimum on a credit card keeps the debt rolling for years. Effective cost approaches credit-card interest rates compounded over time — very expensive. Short-term loans, by contrast, force you to clear the debt in 5 – 50 days, which limits total cost.
For a same-month purchase you can pay off in full, a credit card is typically cheaper. For unexpected cash needs you'll clear in weeks, a short-term loan is usually the better option than dragging a cash advance on a card.