1} Please explain me how sex is determined in hermaphrodites like earthworms, etc. What chromosomes are responsible? This is my thought-> if earthworms follow the human sex chromosomes like X, Y then if an earthworm is XX, how will it reproduce with itself to give male babies?

2} How is sex determined in plants? like in unisexual plants or bisexual plants? Do they have chromosomes for that? any other mechanism?

ad 1) I think there are more mechanisms for this, but I know only one as far. For example Caenorhabditis elegans - a roundworm (Nematoda) has two differents "sexes": XX - hermafrodite and XO - male. The males are quite rare and they are just a mistake during the segregation of chromosomes during the meiosis, like the Turners syndrome (but in mammals, the male sex is determined by the chromozome Y, so XO is a girl).

1) There are 2 types of Hermaphrodites, Synchronous (Both sex at same time; ie: Worms, slugs) and Alternative (can change 1 sex to another; Oyster, clownfish), The changes can are stimulated by environmental factor such as temperature...

2) For plants, there are sexual reproductive organ in same flower or different flower, there are no such Y chromosome in plant.