Caching and cookies -- how does the conflict get dealt with?

what’s the deal with cookies and caching (caching as in a header which basically says ‘cache indefinitely’)? they’re at odds, conflicting. which wins?

i read somewhere, something which gave me the impression that caching can/does win over cookies. so something set to cache indefinitely that also has a cookie set for it, caching of that does/can take place. and further, because caching can take place within the system of the internet, the cookie is cached and shared – because caching at an intermediate point is about sharing (i didn’t fully/clearly understand what i’m trying to paraphrase so i’m not sure on that)

but on the other hand i’ve read something which led me to believe a cookie set on something obliterates any ‘cache this’ directive – because the file had a cookie set for it, caching was ignored, caching doesn’t take place.

so i’ve read what i think is contradictory information, but maybe cookies and caching get dealt with differently in different situations, by different things maybe?

i’d like to understand what the situation is so far as caching and cookies go. do different browsers deal with the conflict in different ways? is it true that something set to cache and has a cookie (e.g. a unique identifier) can get shared among multiple people? caching and cookies…?