As a conjunction that has little real meaning. It simply shows that a declarative clause is part of a larger sentence.
I understood. He was honest. (two separate sentences)
I understood that he was honest. (Here the clause ‘he was honest’ has become the object of the verb understood. That simply joins the two clauses together.)
A that-clause can have several different functions in a sentence. It can be the subject of the sentence.
That she should forget us so quickly was rather a shock.
A that-clause can be the complement.
The main thing is that she is safe.
A that-clause can be the object of a verb.
I knew that she was lying.
I realized that I couldn’t trust him.
It is often used as a preparatory subject or object for a that-clause.
It worried me that he hadn’t returned. (More natural than ‘That he hadn’t returned worried me.’)
Not all verbs, nouns or adjectives can be followed by that-clauses. For structures that are possible after particular nouns, verbs or adjectives see a good dictionary.
Omission of that
That can be left out in some cases. This is common in an informal style.
She said that she wouldn’t come. OR She said she wouldn’t come.
I was surprised that she didn’t phone. OR I was surprised she didn’t phone.
That is also left out after many common reporting verbs.
I thought that she was in Canada. OR I thought she was in Canada.