There is a "Cite" toolbar at the top of the edit window which allows you to automatically generate the required wiki code.
You click one of the templates, e.g. "book", and fill in the details.
More information can be found in Wikipedia:Referencing for beginners or the citations tutorial (the below video will play best in Firefox or Chrome):
Hope this helps,