If your appliance has two hot wires and a ground wire, it is likely a 240-volt appliance. The fact that it requires 40 amps of service indicates that it is a high-power appliance that needs a dedicated circuit to operate safely.
For such an appliance, you will need to use a double-pole circuit breaker in your electrical panel to provide the 240-volt power. The circuit breaker must be rated for at least 40 amps to match the appliance's requirement. The two hot wires will connect to the two terminals of the circuit breaker, and the ground wire will connect to the ground bar in the panel.
It's essential to have a licensed electrician install and verify the circuit for your appliance to ensure it meets electrical codes and is installed safely. Working with electricity can be dangerous, so it's best to leave it to a professional who can ensure everything is done correctly and safely.