Moment of force

This question may sound silly to all of you brainy guys out there but I am one silly guy.
While calculating the moment of a force how do you choose which component (horizontal or vertical) to choose? I know that M=F*d. Its confusing when authors sometimes use the veritical and sometimes the other component.
Also please let me know if there is a nice little websites where such basic conepts could be found.