Hyundai cars have a microchip in the key sometimes these can go out of synchronization, (the key warning light will be flashing) first try
1. A spare key if you have one.
2. Try that if not try disconnecting the battery earth lead for 5 minutes this may reboot the immobilizer module.
3. If you have the metal tag that came with the keys it has a limp home password, you can enter this with the ignition key to override the immobilizer. See picture of manual.