ok.
I will explain this for an apache server. It should be relevant to others.
in the conf directory is a file called mime.types this file defines what the server will use to open each file.
In the file will be something like this.
application/msword doc
application/news-message-id
application/news-transmission
application/ocsp-request
application/ocsp-response
application/octet-stream bin dms lha lzh exe class
application/oda oda
application/pdf pdf
as you can see the line
application/msword doc
states that anything with a doc extension will be opened by msword. to make it download instead you can comment this line out or remove it. the server will not be able to recognise the format and will open a download box instead.