There’s the woman who always sits next to me on the bus.
Who is used to introduce the relative clause and functions as the subject of the relative clause. It provides essential information about “the woman.” This makes the clause restrictive, as it specifies exactly which woman is being talked about.
The book that I wrote is being published in January.
That introduces the relative clause and acts as the object of the verb “wrote”, providing essential information about “the book.” This makes the clause restrictive, as it specifies which book is being referred to.
The escaped giraffe, which had been on the loose for weeks, was finally captured.
Which introduces the relative clause and serves as the subject of the relative clause. It provides nonessential information about “the escaped giraffe.” This makes the clause non-restrictive.