There are two facets to this question: a technical one (quite easy to answer) and a philosophical/procedural one (not as easy, but still not difficult).
I'll deal with the second part first (and the first part second).
When scheduling activities many people try to generate a schedule with pretty "waterfall-like" Gantt bars. The problem is that life doesn't happen that way. Often a resource (particularly in an IT environment) is moving back and forth between various tasks so that a period of time is spent coding, a period of time is spent testing because previously written code now has inputs available from another person, then there's some documentation, then it's back to some coding but on a different module, then it's updating libraries ... You get the picture.
When I'm handling this, I'll often have multiple task bars running in parallel with some starting earlier, some finishing earlier, some starting later, others finishing later -- like a fork with many, many tines. The same resource may be assigned to all of those tasks so you'll look at the task information and you'll see that Mary is working 5% of her time on any given task.
Hamish specifically mentioned a 10-minute task. I never schedule anything that short. Tasks are usually 2-3 days and upwards to allow for the "flitting back and forth".
Oh, people never work 100% of the time. There are always interruptions so getting to 80% is good; anything better is only in your imagination.
Finally, when looking at overallocations, there are a bunch of things that can cause overallocations so I never look at overallocations during anything less than a monthly period. If you've got someone working 22 days in a month then they will show as being overallocated but, frankly, who cares. Your overallocations are based on estimates of time a person will spend -- how good are those estimates?
The technical answer is quite simple.
W = U * D
Work = Units * Duration
It's an equation - anything you do to one side of the equal sign, you must do to the other to keep it equal.
There are three task types: Fixed Work, Fixed Units and Fixed Duration.
So ...
if you want to change the Duration and you want to keep the Work constant then set the task type to Fixed Work, change the Duration and project wil calculate the Units.
if you want to change the Work, and you want to keep the Units constant then set the task type to Fixed Units, change the Work and project will calculate the Duration.
if you want to change the Units ... heck, I'm sure you've figured out the answer here already.
In short, set the Task type to the item you want to hold constant, change one of the other two and the third element will be calculated by Project.
Yes, yes, you can set a task to Fixed Work and change the work -- but that's like running from between parked cars. The result, while predictable, probably isn't what you want.