We use the relative pronoun 'that' for people and for things:
'It was a dream which/that came true.'
We use the relative pronoun 'which' for things.
With people, 'who' is more usual than 'that'. With other things, both 'which' and 'that'
are possible, but 'which' is a little more formal.
These pronouns can be the subject or object of the clause.
Subject: We got on the first bus that came.
Object: We got on the first bus that we saw.
In an adding clause or connective clause (relative clause with commas) we cannot use 'that', and we cannot leave out the pronoun:
'The first bus, which came after five minutes, was a seven.'