What ingredients are used to make beer? I know that it's typically what? yeast, hops, malted barley and water, but sometimes beer is made with other things, (eg wheat). 

What are some of the more typical alternative ingredients, and style beer does that make?
At the most basic you need:


A grain, somehow modified to ferment with yeast (see below)
Water
Yeast
Other additives to impart flavor and help preserve the brew (hops or gruit usually).


The grains are usually malted but note that rice doesn't malt using the normal process, so typically with rice beers you have some other process for extracting starches (most typically you have another culture which breaks down starches into sugars).  Grains historically used in brewing include:


barley (the standard today)
rye
wheat
rice (most common in Asia).
corn
millet  (common in Africa and probably early Asia before being supplanted by rice)
oats
buckwheat


For the other additives, the most common is hops, but other ones in commercial brewing include:


heather flowers
alecost
pine needles
spruce needles
sweet gale
juniper berries
Grains of paradise


Historically the following were also added, but not so much anymore.  Experienced, adventuresome, and/or foolish home-brewers may use these (foolish, if they do this without some understanding or experience of the potential ramifications):


mugwort 
henbane (this was historically a really, really big one but has signficant toxicity and contraindications medically)
bog rosemary


I have experimented with gruits containing the following which are not historically attested to my knowledge:


damask rose petals (gruit also containing hops)
lavender (probably would be great with juniper berries but didn't have any)


Sometimes fruit and/or honey is also added.  Sometimes corn sugar (fructose) is added.  I have also seen other flavoring like garlic and chili peppers added to beer.

Sometimes animal products are included.  Historically the big ones were milk, whey, and chicken broth.  Today, however, those ones are rarely if ever used.  There are cases of oyster broth added, as well as isinglass (made from swim bladders of fish).  Sometimes icelandic moss (an algae) is added as a clarifying agent.

That should be a fairly complete list however assuming you aren't going further afield into other traditional malt liquors.