make sure the diameter of the tube of the fork matches. (i.e. 1 1/8 to 1 1/8 or 1" to 1") I bet you already know this.
Second, you want to google what the rake of the fork is (rake is the offset of the fork). This is hard unless you have A. Proper tools (don't know exactly which ones)
or B. Know the manufacture's specs.
If it is a recent bike, the make of the bicycle will most likely have a spec sheet.
Try googling it though or post on Bikeforum exactly what year/model/make of the bike and maybe someone else already has done a fork transplant.