While today Hyundai has developed a pretty good reputation for low-priced, quality cars, there was a time not long ago when the "quality" part evaded them. Still though, one little P0335 after all these years isn't so bad; maybe Hyundai deserves some belated cred after all.
This code indicates a bad crankshaft position sensor. The CPS is a magnetic sensor next to a toothed wheel on your crankshaft. It serves as a very accurate tachometer and tells the computer where the crankshaft is in its rotation. A bad one will generally stall and kill the engine outright, since the computer just cannot do its job without this crucial information. It's relatively simple to replace, and fairly cheap. Just make sure that when you install your new sensor, the new sensor O-ring seats fully in the sensor recess. The sensor tip has to be mere millimeters from the toothed crankshaft wheel to work; the O-rings on aftermarket sensors for these cars are known to hang up in the hole and prevent the sensor from sitting where it should.