In a textbook, they said that computers are versatile. I thought they were talking of the different sectors of business where computers are used. But they explained that computers can do different tasks simultaneously.
versatile means the ability to do many things; multitasking means doing several things at once. Both terms are appropriate in describing the capabilities of current computers.
Definition of versatile (adj.)
1 : embracing a variety of subjects, fields, or skills; also : turning with ease from one thing to another
2 : having many uses or applications. EXAMPLE: versatile building material
Definition of multitasking (noun)
1 : the concurrent performance of several jobs by a computer
2 : the performance of multiple tasks at one time. EXAMPLE: The job requires a person who is good at multitasking
A "versatile" computer wouldn't necessarily be able to do many different things at the same time. It would be able to do many different things, but possibly only one after the other.
A "multitasking" computer could do many things at the same time, but possibly not different things. You could imagine a computer that controls all traffic lights in a country simultaneously but can't do anything else; that computer would be very good at multitasking but have not one bit of versatility.