Heat-treating is generally two steps. First, you have to get the piece up to critical temperature, evenly thoughout the length and width(more on that later), and quench it in whatever's appropriate for that steel to harden it. Second, you have to heat it up again, but to a much lower temperature; you have to ease the stresses in the blade enough that it won't be brittle, but will still be hard enough to hold an edge well.
What steel you used decides what the critical temperature will be, how you quench it, and how you temper it. Most of the fairly simple carbon steels are very similar in these respects; critical temperature is 1450-1550 degrees F. They can all be quenched in oil to harden. And the temperatures for tempering range from 350-600, depending on the steel and the use intended. A blade that has to be able to do heavy cutting and chopping shouldn't be as hard as one for fine work where you don't want to have to sharpen it often, for instance.
To touch basically- very basically- on how this works, steel has a crystilline structure that changes according to temperature and stress. When you heat it up to the critical temp, several things happen. The matrix of the structure opens up and carbon atoms can actually migrate through it(this is what allows case-hardening to work); the steel gets soft(duh); and most steels go non-magnetic(this temp is also known as the curie point). If you take a piece to a low heat, say 1200 F, and let it cool slowly, you normalize it, evening out and relieving stresses in the piece. If you get it to that temp and cool it very slowly, in hot ashes for instance, you can anneal it, making it as soft and easy to work as it can be, with the structure settling into, let's call it a relaxed structure(yes, there are specific words for the different states, but I can't remember them right now and don't have a reference handy; I'll try to add them in later). If you take it to the critical temperature and quench it, the structure freezes in a very stressed state, and under a microscope the structure will look different, with a needle-like appearance called martinsite(the one word I remember offhand). A high-carbon steel in this state is very hard; a sharp file won't cut it, and it's so brittle that dropping it might crack or break it. Tempering changes the structure a bit and relieves some of the stress, and here you have the hardness/toughness balancing act.
Let's say I'm making a large bowie or dirk out of 5160 spring stock. First problem is to get it up to proper heat along the full length. If you have access to or decide to buy or make an electric furnace, no problem; set the temperature to 1500F, set the blade in the oven and let it get to critical heat. In a forge, you may have to modify the firebed to get a long, narrow fire. What I wound up doing is taking a piece of about 3" diameter steel pipe long enough to fit into the firepot; split it lengthwise; then drill a bunch of holes in one half, no bigger than 1/4" and all along the length and partway down the sides. Then, get a piece of sheet steel and cut an hourglass shape out(you'll have to measure, cut and try to get it to fit), bend it in the middle, take the grate out of the firepot and set this into the hole. The idea is this piece will spread the air blast along the length of the pipe grate, instead of mostly hitting in the center. Set the pipe grate in place, and build your fire over it.
While the fire burns, make sure your quench method is ready. With smaller pieces you can use a can or bucket of oil, but for longer ones you'll need more length. A double-edge piece will have to be quenched point down, but a single-edge can be quenched lengthwise. I got a piece of steel channel about 3" square, cut one side open, and had ends welded on; I can fill it half to two-thirds full and do a fairly long and heavy blade in it. In either case the oil needs to be warmed, because it will flow better and give a more even effect; I usually set a piece of bar stock about 1" diameter in the fire while it's burning clean, and when the bar is low red, put it in the oil, you want it at about 100 F. A point here about single-edge blades; you don't have to heat them all the way from edge to back. Take a dirk that's about 2" wide at the ricasso and tapering. You can heat it so the area about 1/2" to 3/4" back from the edge is at critical temp and lower it edge-first into the oil. It'll smoke and bubble something fierce, and may ignite on the surface, so use tongs that will hold it securely and give you some distance. The advantages of this are two; first it's a lot easier in most cases to heat this section than the whole width of the blade, and this gives a hardened edge section with a softer, tougher back. Done right a blade like this is incredibly tough, and you probably won't live long enough to wear back through the hardened section. Further note: with a long single-edge blade, I try to finish the forging and grinding so the piece actually curves up toward the back a bit; when you quench it the edge section will shrink and pull it down into line.
You'll need to let the fire burn clean and even, then set the piece in. You want a very low air blast here; the piece needs to heat up slowly and evenly, so move it back & forth a bit too. You can check the temperature four ways. If you have one/access to one, an infrared thermometer would be nice. You can use a Templestick, a high-temperature crayon; pick one for the temp you want and either mark the blade and wait 'til it melts or lift it enough to wipe the crayon on it. You can use a magnet. When I mentioned they go non-magnetic, it means that at that temp a magnet will not stick, so you can use a shop magnet on a handle and touch it to the blade, when it doesn't stick you're there. And you can do it traditionally, learn to know the color that means you're there. I'd say a cherry red, but the description varies by who's giving it, so use some scrap pieces and practice. If the piece is not hot enough, it won't harden completely; too hot and the structure enlarges and the piece will be weaker than it should, in extreme cases the edge can actually crumble a bit under stress. So work the piece back & forth and watch the heat. When it's ready lift it out and put it into the quench. If you do this inside, you better have a fan set up for ventilation, especially with a big piece it takes a bit for it to lose heat and the oil will be smoking the whole time. Leave it until all heat coloring has disappeared, and if possible a while more, then take it out and let it cool completely. Turn the fire down but not out, because when the piece has reached ambient temperature, you need to clean it off thoroughly; inspect it for any warping so you'll know where to straighten it(mark with soapstone or something similar); and harden it again. I generally do two quenches with most steels. After the second, leave it in the oil for a while, then take it out and let it cool. And unless you're doing another piece, you can put the fire out now.
When the piece is all the way cooled off, inspect it again, and if all is well you can start tempering it. I wipe it down thoroughly, then wash it with dish soap(Dawn in my case) to get rid of the scale and oil, and put it in the oven. Yes, the one I bake in, which is why I'm fairly damn picky about washing all the oil off first. I set the heat at 375 F for the first heat, let it get up to temp and then leave it for about an hour. Then I pull it out and let it cool, then I hit it with the belt grinder to shine the sides up. I could probably do this before the first heat, but if I drop it it might crack, so I do one heat first. After shining it up I put it back in and, in the case of a piece like this, set the heat up to 425, leave it for long enough to get up to heat plus one hour. Pull it out, let it cool and check the color. For a big blade like this I want a bronze color, or dark yellow, along the edge. If it's lighter than that I increase the heat for the next time. If it got too hot? I reduce the heat by 25 degrees for the next heat, and hope the testing shows it's not softer than I want. Which is why I start below what I figure is needed and work up. And yes, for some things I know what temp I want and just go with it, but for bigger or more intricate shapes I start a bit low.
I do three tempering heats, cooling completely between. After cooling from the last heat, it's time for the next step: testing.