Sometimes 不好意思 can also mean “embarrassed”, “ashamed”.
It can be used either in a set expression:
感到不好意思
Or as an adverbial modifier: “to do something shyly”. Sometimes we can also use the particle 地 after 不好意思 and before the following verb denoting action.
Examples
她不好意思地回答
She replied shyly
tā bù hǎoyìsi de huídá
我真不好意思说我向她撒了谎
I'm embarrassed to say I lied to her
wǒ zhēn bù hǎoyìsi shuō wǒ xiàng tā sā le huǎng
对不起
We use 对不起 in a more formal way. It can be used either in colloquial speech or written language. However the emotional coloring is stronger and the speaker feels more guilty:
Examples
对不起,我失态了
Sorry, I lost my temper
duìbuqǐ, wǒ shītài le
对不起,是我错了
Sorry, it was my fault
duìbuqǐ, shì wǒ cuò le
We can use adverbs of degree before 对不起 and 不好意思:
很 实在 真 非常
Examples
真对不起,我忘了你的生日了
I'm really sorry, I forgot about your birthday
zhēn duìbuqǐ, wǒ wàng le nǐ de shēngrì le
Pay attention
To sum it up:
不好意思 is used in colloquial speech. We use it to apologize for a small fault or to express embarrassment.
对不起 is used both in colloquial speech and in writing. We use it to apologize for small faults or for more serious mistakes.