The adverb 到底 is placed before a predicate. It has several meanings:
1) "finally".
This meaning indicates that an action was completed after a long wait.
Pay attention
In this case, 到底 has a similar meaning to 终于 . However, 到底 emphasizes that it took some effort to complete an action.
Examples
我们到底成功了
We finally did it!
wǒmen dàodǐ chénggōng le
写了很长时间,到底写完了
It took me a long time to write, but I finally finished
xiě le hěn cháng shíjiān, dàodǐ xiě wán le
2) "in the end".
This meaning is used in interrogative sentences to get an answer from someone. It often has a negative connotation.
Examples
你到底对她说了什么?
What exactly did you say to her?
nǐ dàodǐ duì tā shuō le shénme
他到底去不去?
Is he going or not?
tā dàodǐ qù bú qù
3) "after all".
This meaning indicates either a reason or an argument for something.
Examples
到底是年轻人,当然没有累
Of course you're not tired, you're young after all
dàodǐ shì niánqīng rén, dāngrán méiyǒu lèi
她到底是医生,一看就知道有什么病
She is a doctor after all, so she knows what's wrong at a glance
tā dàodǐ shì yīshēng, yí kàn jiù zhīdào yǒu shénme bìng
4) "to the end, to the last".
This meaning emphasizes that an action should be completed from the beginning to the end.
Pay attention
In this meaning, 到底 is placed after a predicate expressed by a verb.