How long can this motor run?
To clarify what comments are evoking and answer your questions :


The battery
A true 20Ah battery will be able to provide 20A during 1h, 40A during 30min or 10A during 2h. Ok that's obvious. You must be aware of the capacity derating that occurs on high discharge currents so you won't be able to get the full capacity. Moreover some Chinese accus capacity are highly overestimated (marketing reasons). Sometimes a factor of 2 must be applied. Depending on the seller seriosity, the 1000W specifies:


either the maximum and reasonable power output. For a 48V battery this means you won't be able or shouldn't get more current than 1000W/48V = about 21A.
or I will suggest that it s an eroneous but common unit simplification that take the capacity 20Ah times the voltage 48V which approximately is equal to 1000Wh. And h is removed. It is common to see incoherent units in some product datasheet.

The motor
Power mentioned is commonly overestimated for marketing reasons. So it must be approximately the maximum power output under specific conditions (optimal speed, maybe higher than 48V voltage, or even for the numerical model of the motor, and so on). For having spent much time looking for motor references on the internet, you always must be careful with announced motor performances.


To answer your questions : 
You will be able to run it an amount of time that depends on the motor charge (how much current the charge will draw) and the efficiency of your control (for a brushless motor for instance). A BLDC motor with a 80% efficiency functional point and an output power of 200W (speed in rad/s times torque in N.m) will drive 200/0,8=250W electrical power. With a 48V battery it means an average current of 250/48=5,2A. So your battery will works less than 4h. Take some margin because of what I explained in 1.
Apply this to your application, that's it.