In short: an overdraft is credit that lets you spend more than you have in your account, up to an agreed limit — the minus is a loan on which you pay interest.
Simply put: it helps with a short gap between spending and income. The limit is revolving: whatever you repay you can use again. That makes it easy to get used to living "in the red" while interest runs.
Example: €500 overdrawn for two months at 12 % annual interest costs about €10 in interest (500 × 12 % × 2/12), plus any fees in the contract.
Watch out: an overdraft is not "my money". If you are always overdrawn, it is a signal to look at your budget.
The EU rule: no compensation is due for early repayment of an overdraft (Directive 2008/48/EC, Article 16); overdrafts repayable on demand or within three months follow only part of the Directive's rules (Article 2(3)).
Example: Bulgaria — the Consumer Credit Act covers overdrafts repaid over more than three months (Article 3); those repayable on demand or within three months have a shorter contract (Article 12).
Check in your country — Ask your bank for the overdraft rate and fees; payment account providers must give a yearly statement of fees.
Source: Directive 2008/48/EC — https://eur-lex.europa.eu/eli/dir/2008/48/oj; Pecuvo Module 22, Chapter 2, and Module 26, Chapter 6.