A sword is forged from one piece of metal.
The hilts & guards are just embellishments (important ones — more later).
I'm sure you have seen many accounts of swords (katanas etc.) being forged from many pieces. This is because most of those weapons were made from poor steel and the forging techniques were designed to overcome this. In any event, once the final billet is formed the sword is forged from a single piece and as a single piece. With modern techniques (dropforging) and the right steel (a good spring steel) a sword blank could be forged with one strike. There would be considerable finishing & heat treating to do but the 'forging' part would be done. Hilts/quillons could be part of the initial forging but this depends on the kind of sword you want. Look at Oakeshott if you want detail on types. Sword types are adapted to their combat purpose and mileau. Contrary to popular belief the katana (while a beautiful object) is no more effective than the broadsword or late English backsword. It just happens to be very effective in combination with a particular fighting style and set of circumstances. I however would not want to go up against, say, Guy Windsor (modern European fencing master & broadsword exponent) with one (equally armoured). He'd take you apart.
The above is really just a quick overview. The physics of sword motions and impacts are non-trivial and dependent on the combination of the design of the blade, weight distribution and the geometry of the tang. There is some detailed material on Swordsite.
The hilt takes many forms from a simple crossguard hilt to a complex full basket. It is essentially designed to protect the hand. The grip is what encloses the tang and makes the sword comfortable to hold. Hilts come in more varieties than swords. Essentially you want the tang (the part of the sword inside the grip) to flex on impact and in combination with the movement of the pommel, (the knob at the back) to absorb the shock. While you may have seen pictures of swords that appear to have single piece blades and grips this would lead to poor physics for anything but a thrusting weapon. A lot of knowledge about sword physics and design has been lost and there is presently a concerted effort in the enthusiast community to rediscover it.
Hilts are embellishments in the sense that they may be minimal, a small disk (katana), simple such as a crossguard (hand and a half, or broadsword), complex quillons (rapier) or full or part basket (schiavona, cutlass, claymore, backsword). Each will affect the style of 'fight' with which the sword is used. In answer to your question a simple hilt could be forged integrally with the blade. It is not done because making it as a separate piece allows more design freedom and does not compromise the weapon. It also allows for easier repair as the hilt can take quite a beating even in practice. I've re-hilted the claymore I use in practice once already and it's about time to do it again.