The DOT rule is that if you book at least 7 days before your flight, you have 24 hours to cancel for free. Because it's a DOT rule, every airline has to follow it.
AA is more generous; they reduce the 7 day requirement to, I believe, 2 days. And they often give you more than 24hr to cancel (I think you get until midnight the next calendar day, DFW time). But you are guaranteed a minimum of 24 hr.
AA also lets you put a flight on hold, for free, for 24hr+ (again, I think you get until midnight DFW time the next day). You can purchase an on-hold flight for that same price and time before the hold expires. If the price drops you can either cancel the hold or call in and have them re-fare it.
If you cancel outside of the refund window then it depends on your ticket's fare rules. For domestic tickets, Basic economy tickets have no value if cancelled. Regular economy tickets retain their full value as a flight credit, which expires 1 year after your flight was originally scheduled. When you buy a regular economy ticket, you can also usually pay an extra $50 to make it fully refundable.
International tickets may have different rules depending on where they originate. You need to read the fare rules to be sure.