Torque is just a rotational version of the same principle as linear impulses:
Let us look at
F = ma
To compute the change in velocity, we change it to
a = F/m
Likewise we can say:
T = Iw
Where T is torque, I is inertia, and w is angular acceleration. Let's rearrange that:
w = T/I
Now we can use torque to compute the change in rotation.
However, angular acceleration is a vector, and inertia is a tensor, that is a matrix, representing the resistance to change in velocity along 3 axes. This creates a small issue, in that we cannot divide a vector by a matrix directly. but let's construct our tensor first:
float ix = cube.height * cube.height;
//cube so all dimensions equal,
//but other objects may not be
ix = (cube.mass * (ix + ix + ix) )/12.0f;
matrix3x3 inertia = {{ix, 0.0f, 0.0f},
{0.0f, ix, 0.0f},
{0.0f, 0.0f, ix}};
But first, we need to compute T. To compute T we need to know where on the cube, the linear impulse is being applied (point p). Once we know this, we can calculate the level vector, t:
vec3 t = p-cube.centre();
// the lever is defined as a vector from the centre of mass, to the point of impulse
Now we can compute the torque:
T = F X t
where T is the cross product of the linear force (F) and the lever(t)
Now, in order to perform our division, we use a little trick. We multiply the torque impulse by the inverse of the inertia tensor, in order to get the change in angular velocity:
w = inertia.inverse() * T;
This will give us our final value. This is a vector, who's magnitude is the amount of acceleration, and the normalized vector is the axis of rotation.
Update:
A final point on updating position/orientation, and calculus. They are not directly changed by forces. An impulse, or force, translates to a change in velocity, or acceleration. It then follows that velocity is a change in position. Calculus is the mathematics of change.
Once you have computed your change in linear velocity, you simply add it to your cubes current velocity. Same with angular velocity.
cube.velocity += a; //a is acceleration: a=F/m
cube.angularVelocity += w; //w is angular acceleration: w = T/I
Then, during each frame, or update, you perform integration on the velocities to make changes to position/orientation, thusly:
position+=velocity * deltaTime; //deltatime is a very small interval (~60th of a second)
orientation+=angularvelocity*deltaTime;
This is known as Euler integration. It is very useful, but not the only way of doing this. You can also look into Verlet integration, which I will not go into here.