I wonder how I should use 其. To express possessive pronoun, you can use 他的，它的，他们的，etc.
So when should I use 其? Can it function as just a replacement for these possessive pronouns?
(And I just found that it is also used as a subjective pronoun...)
One challenge of Chinese is that the same characters may have literary/classical uses as well as contemporary uses. Often in modern usages, characters that are used as stand alone words only appear as parts of multiple character compounds (for example 其它).
其 is one such character that is frequently used in literary/classical Chinese, and often creeps up in those contexts in idioms or other allusions to older Chinese varieties.
I would recommend not using 其 in speech except in words you know that use it (examples of some common words with it: 其他、其实、尤其、极其...).
I'll await somebody else's explanation for its meaning in literary/classical uses, but my impression is that most speakers will just memorize fixed expressions or very short constructions and not use this form too productively.
其, in ancient Chinese, is used as a personal pronoun: he, she, it, his, her, its. nowadays, in Chinese, we partially inherited its usage. That means it will only make sense in some fixing words, phrases and sentences. besides examples by haksayng, there are more (which are commonly used in my quotidian world): 以其人之道，还治其人之身 （meaning "fight fire with fire" or "tit for tat"）, 有其父必有其子 （meaning "like father, like son"）, etc...