When "what" is not an interrogative word, you can translate it to "ce qui" if it is a subject or "ce que" if it is a direct object:
- That's what bothers me = c'est ce qui m'ennuie.
- That's what I told him = c'est ce que je lui ai dit.
Use natural English when making your translation. The literal, word-for-word method really doesn't work here. Perhaps you understand the meaning--now put it in standard English.