"that" in this context is called a complementizer. Its function is to turn a complete sentence into a noun. Well, not exactly a noun, but an expression that can be used like a noun!
New words, one handy idiom, and a 2-minute quiz — delivered to your inbox to keep your streak alive.