Which is generally used when you want to introduce a new clause within a sentence.
I saw a dog, which was similar to mine, but i didn't like it.
I saw a dog that was similar to mine, but i didn't like it.
In this case, when you use which, it's a bit like: "yeah and by the way.. the dog was similar to mine". It's additional information, which can change the nuance of the sentence, but it's not part of the main sentence. <- just like in this sentence.
Just google that/which and you will get lots of results covering this. You can also read more about dependent clauses here: