Artefact - artifact
Artefact is the usual spelling in British English. American English prefers the spelling artifact.
In both forms, this word derives from the Latin: art- means 'art', or 'craft'; fact means 'made'. The relationship was shown in the Latin by the ending of the first word. A thing arte factum (the ablative case) was a thing 'made by art [or craft]'. A thing arti factum (the dative case) was a thing made 'for art [or craft]'.
The American spelling
artifact is seen as a mistake.
If you are an archaeologist and find an object made by humans, you may not be able to judge why it was made. So your choice of whether to write artefact or artifact has to be a matter of convention. If you are not an archaeologist, it is a matter of convention anyway; and in the UK, the convention is to write it as artefact.
- Etymological note: OED (2008) gives a fuller and more accurate explanation: "[The spelling with '-e-' comes from] classical Latin arte, ablative of ARS 'art' n.1 + factum, neuter past participle of facere 'to make' (see FACT n.). [The spelling with '-i-'] apparently altered after classical Latin arti- , alternative stem of ARS 'art' n.1, in e.g. artifex artifex n., artificium artifice n."