που vs ο οποίος
Both που and ο οποίος mean “who / which / that”, and most of the time they are interchangeable - but they differ in register and in one hard rule. που is INVARIABLE, everyday, and the DEFAULT in speech: ο άντρας που είδα, το βιβλίο που διαβάζω. ο οποίος INFLECTS, is more FORMAL/written, and is chosen when you want to be precise about which noun the relative points to (it shows gender/number, so it removes ambiguity που cannot): ο δάσκαλος της μαθήτριας, ο οποίος έφυγε (the -ος ending makes clear it is the teacher, not the pupil, who left). The ONE place the choice is forced: after a PREPOSITION only ο οποίος is possible - με τον οποίο, στην οποία - because που cannot follow a preposition. Rule of thumb: reach for που by default; switch to ο οποίος after a preposition, or when formality or clarity calls for the inflected form.
The rule
Both mean “who / which / that” and most of the time they are interchangeable - they differ in register and in one hard rule. που is invariable, everyday, and the default in speech: ο δάσκαλος που είδα, το βιβλίο που διαβάζω. ο οποίος inflects, is more formal and written, and is the one to choose when you need to be precise about which noun the relative points back to: because it shows gender and number it removes an ambiguity που cannot. Ο δάσκαλος της μητέρας, ο οποίος έφυγε makes clear it was the teacher who left, not the mother. The one place the choice is forced is after a preposition, where only ο οποίος is possible (με τον οποίο, στην οποία). Rule of thumb: reach for που by default; switch to ο οποίος after a preposition, or when formality or clarity asks for the inflected form.