If capacity of battery is 50mAh, and its fast charge capacity is 1C, then its maximum charge current is 50mA. If we are using 2500mA charger and charging the battery what will happen? whether we can program the charger to maintain charge current provided to battery?
The important thing is to use the correct battery charger circuitry based on the chemistry of the battery. You don't mention the type of battery you have.
For many battery types, such as the Li-Poly generally used in cell phones, you need a special battery management IC such as the "bqTINY" bq24013 which regulates both the voltage and current. You can't just hook up a fixed voltage to the battery and expect it to charge properly. Instead, it would likely heat up and worst case catch fire.
The basic algorithm for Li-Poly batteries is to charge at constant current (0.5 C to 1C) until the battery reaches 4.2 Vpc (volts per cell), and hold the voltage at 4.2 volts until the charge current has dropped to 10% of the initial charge rate. In addition, a charge timer should be included for safety.
The desired charging current (0.5C, 1.0C or whatever) is typically set up externally to the chip by a voltage divider or other means.
Cheaper chargers may omit the constant voltage part (Stage 2) but that is not recommended.
So as you can see, the charge current is controlled by the charge management IC, and it doesn't matter how much current is made available, as long as it meets the minimum required by the algorithm.
Other battery chemistries will have different charging algorithms, but in general you should always use a battery management IC suited for the particular battery you have. Here is the list of battery chemistries supported by various battery management chips found on Digi-Key. Multiple types on one line refer to chips that can support all of them in one IC.