It depends what you are referring to. We have to get everyone on the same page here and state what you mean:
Lock computer
Log off computer
Log off AC
Exit AC
Starting with AC, you can use File -> Quit or use the red x button at top right to completely close the program. This SHOULD close the program and not have parts of it running.
To Log off AC so one can quickly log on with another user, you must go to File -> Logout. The program will still be completely running in RAM and no other instance of AC can open.
For computers, it is slightly different. To lock a computer, you can choose the Windows button + L or use CTRL + ALT + DELETE. When you lock it ALL you do is protect it from others. It has done nothing to the state of the computer. Every program and anything running on the computer is still running in RAM or on the taskbar, etc. You cal also have your screesaver automatically lock it.
Locking it is good when you will be taking a short break or you know you will be using it again. This is because you don't have to shut down programs and you don't have to wait for the computer to log back on.
Logging off however has many advantages. Usually, knowing you are going to log off and lose all programs and data, you close them down properly. If not, logging off will close them for you unless Windows can't get some driver to cooperate. WIN 7 now blasts right through those. Logging off shuts all programs off and severs all connections to servers and databases. Also, if you have updates, you cannot damage another program.
The other advantage is if you log off any one without local admin rights can log on. If you just lock it, then an admin will have to log in so they can log off so that user can now log in.