The question is somewhat vague.
The computer by itself cannot do that. However you can program the computer to send the proper input/signal to an actuator or similar device that could physically accomplish the required task.
There are also lots of microcontoller packages on which you can load a program and install separately to accomplish the same task, which make it even easier since they provide a high level interface for a task which would otherwise involve a lot of low-level electrical engineering work.