Agility is your ability to transition quickly from one movement to another. The more agile you are, the faster you can change directions (horizontally, vertically, or laterally).
Best practices to build your agility is to practice quick movement exercises that requires you to change direction constantly and (to add on top of) unpredictably.
You can use are agility to move at different directions faster as well as perform faster reaction timing. Plenty of sports require a lot of agility training in order to be able to maneuver around obstacles. You will need agility to move quickly when you need to move from one place to another in a short amount of time.