These unstressed particles are tacked onto question-words (ктћ-то/ктћ-нибудь 'somebody', гдљ-то/гдљ-нибудь 'somewhere', кђк-то/кђк-нибудь 'somehow', чтћ-то/чтћ-нибудь 'something', etc. The rule of thumb for when to use them is:
Use -нибудь in interrogative and imperative sentences.
Вђм чтћ-нибудь нџжно? Do you need something/anything?
Принесќ мнљ чтћ-нибудь почитђть. Bring me something to read (anything at all).
The difference in meaning between -то and -нибудь is this:
(1) -то refers to a specific thing (or person, or place, or time, depending on the question word it is used with), but the speaker cannot identify it specifically.
(2) -нибџдь refers to a thing (or person/place/time) which is not specifiable, because it may be one of a set of things.
(1a) Пљтя кђждый дљнь кудђ-то хћдит. Every day Pete goes somewhere. (to a certain place)
(Suspiciously: I wonder what's this mysterious place he goes to every day.)
(2a) Пљтя кђждый дљнь кудђ-нибудь хћдит. Every day Pete goes somewhere. (somewhere or other)
(Admiringly: Pete has such a wide range of interests: today he's off to the museum, tomorrow the zoo...)
(1b) Кђждый вљчер ћн ухћдит к комџ-то из своќх друзљй. Every night he goes to one of his friends' place.
(To one specific friend's house — to the same one every night.)
(2b) Кђждый вљчер ћн ухћдит к комџ-нибудь из своќх друзљй. Every night he goes to one of his friends' place.
(To one or another of his friends' house — perhaps one day to Sasha's, another day to Vasya's,...)
(1c) Пљтя обещђл принестќ мнљ какџю-то интерљсную кнќгу. Pete promised to bring me an interesting book (= some book, a certain one. Pete had a certain book in mind, but he didn't tell me the title, or maybe I've forgotten.)
(2c) Пљтя обещђл принестќ мнљ какџю-нибудь интерљсную кнќгу. Pete promised to bring me an interesting book (= any book at all, so long as it's interesting, i.e. some good reading. He didn't have any particular book in mind.)
Special case: Когдђ-то means 'once, at some time in the past'.
Ї когдђ-то жилђ в Москвљ. I once lived in Moscow.