We use both for describing a noun, 'which' tends to be used in more formal situations and 'that' is used more often, especially in speech. When the noun has been sufficiently described that it's known to everyone, we switch to using 'which' only.
The pen that/which you're holding is John's. His pen, which is a beautiful shade of blue, was bought for him by his ex-wife.
Student or Learner