I don't understand the difference between the two, don't they both mean "to explain"? When would one be used over the other?
2 Answers
表白 is almost always used to someone (or a group of people), and it is usually feelings that are being explained. Most often it means "confessing your love or crush". So you can say "我向她表白" (I "explained" to her, which means I confessed my love to her) Without a romantic context, you can say "我一再表白,生怕别人误会" (I keep explaining, afraid of being misunderstood by people).
告白 has the same "express" meaning, but not as much "explain" as 表白. So the romantic example above can be exchanged with 告白, as in "我向她告白" (I express my love to her, which means the same thing), but the second example would not work with "告白".
In addition, 告白 can be used for public announcement, which you cannot use 表白 there. For example, "告白天下" means "announce to the world". This usage is a little dated but it is very much still understood.
It's easier to distinct in Chinese.
表白: 1. 表达明白; 2. 表示清白
告白: 1. 告诉(明白/清楚); 2. 公告/ 通告(明白/清楚);
Sense 1 can sometimes be used interchangeably, while sense 2 is different.