Is an Xbox one s compatible with a Xbox 360?

Like on a player talking to player with headsets and talking in Minecraft

Probably

It's only possible if the player on the Xbox One is playing an Xbox 360 game in backward compatibility mode, because then as far as Live is concerned both players are on a 360.

It normally isn't possible between an Xbox One and 360. Minecraft won't work because it's not backward compatible, and the 360 version doesn't have the cross-platform "Better Together" update either.

It is up to the game. If the game maker has let both versions on the same server, then the same functions should work. The headsets only convey your voice to the system. What the game does with it is up to it.
suffice it to say that if you see the other player, you should hear them as well, as long as the headsets are both working properly…