There is a number of ways to say “I’m sorry” in German.
Basically, “Entschuldigung!” means “Excuse me!” or “Apologies!” and “Es tut mir leid” means “I am sorry.”
If you look a bit closer, “die Entschuldigung”(feminine) is a noun meaning: “the apology”, but the root of the word is “die Schuld” = “guilt”. “ent-” is a prefix of verbs meaning “de-” or “dis-” and “-ung” makes it a noun. So literally it means: “deguiltyfication”. So you ask for your sin or guilt to be forgiven or, which is more present in the word, you give a reason why it should be forgiven. In most cases this reason is that you ask for it by saying: “Entschuldigung”. If the case is more severe, it won’t be so easy though.
Then it might be better to try “Es tut mir leid.” Important word here is the verb “leidtun”. It is a separable verb so the first part gets sent to the end of the sentence when the verb is being conjugated. “Tun” means just “to do”, or in this connection it is close to “inflict”. So the word means “to inflict ‘leid’ on someone”. In the form above: “It(es) inflicts ‘leid’ on me(mir).” Now “leid” stems from the noun “das Leid” = “the harm/suffering/sorrow”. But here it is not meant as strongly, “sorrow” would be the highest border when you want to express what you feel about somebody’s loss. But basically it expresses that in hindsight you are sorry about it, wish you didn’t do it and already feel bad because you did it. It can be used more casually but looking at the heritage of the word it cannot surprise that many Germans don’t use it for every small thing.
Here are some examples of expressing the apology in German, with English translation:
Entschuldigung! – Pardon!
Es tut mir leid, ich kann heute Abend nicht bleiben. – I’m sorry, I cannot stay tonight.
Es tut mir leid, nicht in der Lage zu sein, Ihren Wunsch zu erfüllen. – Excuse me for not being able to fulfill your request.
Entschuldigen Sie die Störung. – Excuse me for disturbing you.
Verzeihen Sie meine Ausdrucksweise. – Pardon my French.