Signs it may be the key
A flashing security or key-shaped light on the dash, an engine that starts then dies after a second or two, or a spare key that starts the car normally all point toward the vehicle not recognizing the key. Recently copied keys and keys that were dropped or soaked are the usual suspects.
Signs it is probably not the key
Dim or no dash lights, rapid clicking, or no sound at all often point to the battery or starter. A smell of fuel, warning lights for oil or temperature, or a vehicle that cranks normally without any security light are usually mechanical. Those are jobs for roadside assistance or a mechanic.
Simple tests you can do
Try the spare key if you have one. Remove other keys and fobs from the ring in case of interference. Lock and unlock with the remote to see if it responds. Note exactly what you see and hear; that description is the most useful thing you can bring to the call.