munim2020 , iam sorry to say that your answer is so wrong!!!!!!!!! .
ONLINE UPS : online ups means it will always runs on battery , it never link ac directly to the pc ,at the same time it use ac to charge its battery
OFFLINE UPS : thats the ups that we use in our home and for normal desktop use .These ups are line intractive ups that it draw power directly from ac and it regulates it then its supplys to computer .In the event of power failure it goes to battery mode