An altar is a religious structure (usually a small table). What it is used for depends greatly on the religion.
What is it used for?
Altars have many different purposes. In Neopaganism, it is often used for setting out gifts for or symbols of a particular deity. Witches often use their altars as a workspace, for spells. There are also Sabbat altars, for which people will place symbols of the current Sabbat on the altar.
How do I set one up?
Setting up an altar is much easier that it might seem. First, decide what you want your altar to be. Is it designated to a deity? Is it a workspace? You can have more than one altar, so don't stress about it too much.
Secondly, get a stool, desk, table, or anything else along those lines. I use one of those small countertop shelving units, set on its front. I know someone who used the top of her dresser. I even met someone who used a plastic bin with a cloth thrown over it.
Once you have the surface, start putting things on your altar. If it is a deity altar, maybe put out a statue or drawing of the deity, some symbols of them, and some things that they like. You can set prayer beads on it, too. For example: say that you're making an altar for Hestia. You could set warm colored candles on your altar to represent hearths, set out a small loaf of bread, and put a figurine of Hestia on it.
If it is a workspace altar, keep it as clean as possible. You don't want anything getting in the way while you're doing a spell. For example: on my altar, I have symbols of the Elements (a cup of salt for Earth, a candle for Fire, a shell for Water, and incense for Air). I also have a small pot for me to pit the incense in, a tambourine-type instrument with a pentacle on it, two knives, and a pendulum. I also have a small cat figurine, because I've always felt a connection to felines and it gives me something personal. You DO NOT have to fit every tool on your altar (I made the mistake of trying when I was very new to Witchcraft, and it did not go well). Have a separate area for all the tools that aren't on your altar. I keep all of mine in a bin close to my altar in case I need them.
Hope that helps!