In my textbook, it is written that the binomial name of mango is Mangifera indica and the binomial name of a bee is Apis indica. Now in the name the second part is the name of species. But mango and bee are not the same species. One is a tree and the o,ther is an animal. Then why is their second name the same?
In short, we do not think about the uniqueness of the second part of the binomial (the species epithet) but about the uniqueness of the binomial itself (the genus and the species epithet). Thus, the unique binomial of mango is Mangifera indica and the unique binomial of bee is Apis indica. For more detail, see this question.
To complicate matters slightly, plants and animals are governed by different nomenclatural codes. So it is possible for a plant to have the exact same binomial as an animal. These are called "hemihomonyms." For more detail, see this question. However, a plant cannot have the same binomial as another plant, and an animal cannot have the same binomial as another animal.
In this specific case, the authors probably chose to give both species the epithet indica because they are associated with the Indian subcontinent, which is the root of that word.
That is the species name it is often the same for unrelated organisms, that is why we use a two name system. Binomial nomenclature (literally, two term naming system) goes Genus species respectively.
The first part of the binomial identifies the genus (which should not be the same unless they are closely related) and the second is the species name which is often little more than a descriptor, you would be amazed how many species names translate to simple concepts like colors or one of the most common, familiaris which just means household or common. In dinosaurs many many end with carnegii because Andrew Carnegie funded so much paleontology and scientists knew who buttered their bread. In your case indica literally means "from India" in latin so it is not surprising many things carry it.
Mangifera indica means 'mango from India', Apis indica means 'honeybee from India;' guess where they were first discovered.
In short, the second name really doesn't matter as long as it does not match anything else with the same genus name. As long as the combination of the two names is different and unique. The first name, the Genus name, however should not be the same unless they are related.
Think of a binomial as a first and last name. Both the genus (first name) and specific epithet (second name) can vary, but both together indicate an individual [species]. Additionally, like most names at some point in their origins, the specific epithet (and often times the genus) "names" can have meanings (and so, in a way, act as adjectives). In your case, indica simply means that each taxa originated (or at least was first described) in India.
See here for further [easy to understand] explanation.
Indica in binomial nomenclature means "of India" - from classical Greek and Latin.
Apis indica is more specifically the binomial name of the Indian honey bee, one of the predominant bees (most common bees) found and domesticated in India - differing from the western honey bees (Apis mellifera - mellifera is the Latin word for "honey-bearing") one of the first domesticated insects and most common honey bees around the world.
Mangifera indica or "Indian mango", has been so widely distributed around the world that it has become known as "common mango" and remains one of the most widely cultivated fruits within tropic regions.