1. Create a folder e.g. in your Documents-folder on M: called stata
2. Create two folders inside this folder called personal and plus
3. Create a new do-file named profile.do, with the following content (paths should lead to the folders you created above):
sysdir set PERSONAL "M:/Documents/stata/personal"
sysdir set PLUS "M:/Documents/stata/plus"
cd "M:/Documents/stata"
4. Place profile.do in your Documents-folder (typically in M:\pc\Dokumenter\) and it should run automatically when you launch STATA. You can verify this in the results-window, where STATA should report: "running M:\pc\Dokumenter\profile.do ..."
Any addons you install using the net install-command will now be placed in the plus-folder. You should place programs you have written on your own in the personal-folder. When you call a command that Stata does not immediately recognize, it will now look in these folders and run programs (ado-files) from there if they exist.
If profile.do does not run automatically, you need to start every session by doing so yourself. (On your own computer, you could place profile.do in the same folder as your Stata-program (exe-file) which would ensure autorun.)
Note that you can include in profile.do whatever commands you want to run at the beginning of each session. This is rarely useful, however, since you will typically rather make an ado-file for these purposes.