Hey Neezil, don't panic. I'd like to see a pic of the "square hole" if you can post it. If the base plate came off, logic tells us it was ATTACHED somehow. So, a pic of the underside of the base plate would be helpful too.
If the lights are off, you might be OK ... Not gonna get you shocked! Often poeple will shut off the breaker just to make sure. I get the sense you have no clue how to do that.
First, change the bulbs where you can manage it (where the base plates did NOT come off). That gives you some light. Obviously, you will NOT have the lights on while you are working on the other lights !!
Second, once we can see the base plate and attachment mechanism, replacing the base plates will be easy. Just remember to take off the glass cover before trying to put the base plate back up !!
Third, you need a stable ladder. If you have a lousy wooden ladder, it could scare anyone. Fiberglass or metal are your best bets.
I will send you a private message to speed this process