If your car has an automatic transmission, there are a few ways to tell if it is starting to fail. The most common symptom is the transmission slipping: the engine revs without the car moving, or the car moves but very slowly. You might also notice that your transmission is leaking fluid, or that it's making strange noises. If your transmission is starting to fail, it will usually throw a code.
To check for codes, you'll need a code reader. You can buy one at most auto parts stores, or borrow one from a friend who has one. Once you have the code reader, connect it to the diagnostic port under your dash (usually on the driver's side). Turn on the ignition but don't start the engine. The code reader will display any codes that are stored in the computer.
If your transmission is failing and throwing codes, it's important to get it fixed as soon as possible. A failing transmission can cause serious damage to your engine, and can even leave you stranded on the side of the road. If you're having trouble with your transmission, take it to a mechanic and have them run a diagnosis. They'll be able to tell you for sure if your transmission is failing and needs to be replaced.