[noun] + によって [noun] + による + [noun] [noun] + により [verb (plain)] + こと + によって
によって comes from よる, "to depend on", and marks the noun the rest of the sentence rests on. In English that comes out as "depending on", "because of", "by means of" or, in a passive, "by". It follows a noun directly; before another noun it becomes による.
With a verb like ちがう違う or かわる変わる, によって says the result varies with the noun. This is the meaning you hear most in conversation.
によっては narrows it to some cases: "in some places", "for some people".
For a cause, によって belongs to news and written reports: accidents, disasters, delays. In conversation で or から is usual: たいふう台風でいえ家がこわれた壊れた. For a means, a verb goes in with こと: はなしあう話し合うことによって.
An ordinary passive marks the doer with に. によって marks the maker with verbs of creating and discovering – かく書く, たてる建てる, はつめい発明する – and in formal writing.
Before a noun the form is による: じしん地震によるひがい被害, "damage from the earthquake". により is the written way to end a clause, in announcements and reports.