Your first opportunity to fight the Ur-Dragon is in the Everfall (after you defeat the dragon boss). Enter the Chamber of Lament, 7 chambers down. If you don't want to fight him here, you can find him in NG+. There will be a portcrystal on the beach in Cassardis which can be used to get to him.
His health is affected by everyone else playing the game online. Their attacks hurt him and when the Ur-Dragon kills them or one of them fleas, he gains health. If you're lucky, you will join the fight when he is at low health. If you join and he has lots of health you can leave and join again another time, but if you leave he gains health from it.
You can fight the Ur-Dragon offline and he will be easier to kill than he would be if you fought him online with lots of health. You will be the only person hurting this Ur-Dragon, the loot will be different, and he will still be very difficult to kill compared to other enemies in the game.
For tactics on how to defeat the Ur-Dragon and tonnes of other useful information, go here.