A friend gave me a stovetop that was separate from the oven which burnt out.The two pieces were inserted into cabinets .I want to hook up the stove top in my shed for cooking. Its the type that has all the knobs built into the top.The problem is that theres only two wires plus a bare ground coming out of it.How do I hook this up?
You don't say what region of the world you're in, but that's commonly referred to as a "cooktop" in the US, distinct from an electric range. (which is a standalone appliance that includes the oven.)
But both cooktops and ranges can have "3-wire" hookups in older units, where more modern appliances will now use 4-wire hookups, which adds neutral as the fourth conductor. Two of the three wires are hot, and the third is the ground. With 4-wire hookups, a neutral is also included.
If that is what you have, it requires 240volt (in the US) power. Do you have that in your shed? You would need to hook the two hot leads up to an appropriately sized dual-pole breaker, red to one pole and black to the other, ground to ground.
Get the make & model of the unit & then search for the electrical specifications.
You want to determine the required voltage, current, frequency, & phase (e.g.: 120VAC, 20A, 60 Hz, single phase OR 220VAC, 30A, 60 Hz, single phase <-- US & US-like power grids).
You also want to determine how the internal wiring should be connected to your source power. That information should be in the installation guild for the unit. If it can't be found, then you can obtain wiring diagrams online that will show the correct wiring connectivity.
Based on the above information & the distance from your cooktop to your electrical power, you will need to get the proper cabling. That cabling will safely carry the amount of current that your cooktop requires. It will also be rated for how you plan to run it. For example, if you intend to bury the cable, it will be rated for burial. If you intend to run it inside conduit, it will be rated appropriately for that situation, etc.
If you are not experienced in working with electricity, I highly suggest you get someone who is experienced to do the final connectivity & testing for you.
There'll be a plate on the unit that will tell you what it requires for power. It'll tell you Voltage (120V or almost certainly 240v) and current in Amps (20A, 30A, 40A, 50A etc.) You'll need a dedicated circuit (breaker) so this must run all the way to your service panel (breaker box). The wire must be
12 gauge if 20A 10 gauge if 30A 8 gauge if 40A 6 gauge if 50A
95% of this job will be constructing a physical route for the wiring to go through, especially if the shed is detached from your home. Just saying: you don't need to be a licensed electrician to create that route. It helps to be geeky about NEC and general construction practices so you get it right.