A digital signature is cryptographic proof that a message was approved by the holder of a specific private key. In Bitcoin, the message is a transaction, and the signature proves you are allowed to spend the coins.
Better than a handwritten signature
A signature on paper looks the same on every document, so it can be copied. A digital signature is different for every message. It is calculated from both the private key and the exact transaction data. Change one satoshi or one address and the signature becomes invalid. Copying it onto a different transaction does not work either.
Sign and verify
Signing: your wallet combines the transaction data with your private key (and a fresh random number) to produce the signature.
Verifying: any node can check the signature with your public key. If the math works, the transaction is authorized. At no point is the private key revealed.
The algorithms
Bitcoin originally used ECDSA on the secp256k1 curve. Since the Taproot upgrade in 2021, it also supports Schnorr signatures. Schnorr signatures are simpler, have a security proof under standard assumptions (BIP340), and can be combined. A multisig spend can then look like an ordinary single signature on-chain, which saves space and improves privacy.
A famous mistake
Signatures require a fresh random number every time. In 2010, Sony's PlayStation 3 reused the same number, and hackers were able to recover its private signing key. Some early Bitcoin wallets with weak randomness had the same problem, and their coins were stolen. Modern wallets derive this number deterministically from the key and the message (RFC 6979) to avoid the risk.
Signatures are why Bitcoin does not need accounts or passwords. Math, not a bank, approves your spending.