1. The object is created on the stack.
2. The constructor is called.
3. The destructor is called.
4. The object is then forgotten.
The example you provided is a good demo of how you can introduce locking bugs. Because the object goes out of scope right away, it doesn't really do anything useful.
The proper way to do it is:
If you do something like this...
void ProcessLock(const CTempLock & TempLock)
Then the temporary object will exist for the lifetime of the call.