We do NOT recommend you go into abandoned buildings yourself.
There are a multitude of dangers inside abandoned buildings including many that you would never even know about or consider until it's too late. If you absolutely must explore then here are some safety essentials:
Never ever EVER EVER go into abandoned and dangerous places on your own, always go in a group of at least 2. However it's also advisable to keep it to a max of 4 people for other reasons.
Make sure someone outside of the exploration group knows where you are.
ALWAYS KNOW WHERE YOUR EXIT POINTS ARE! You never know when you may need to get out quickly.
Be aware of your surroundings. Are the floors solid, is the ceiling safe? Can you re-open doors if they close behind you? Are dangling wires live?
Watch where you put your hands, many abandoned buildings have used needles in unusual places as well as a variety of unknown chemicals and who knows what!
And some equipment essentials:
A good powerful torch + spare set of batteries AND a backup torch. Abandoned buildings usually have no electrity and are often boarded up, you need good sources of light.
A fully charged mobile phone.
Suitable clothing is vital otherwise you will be very uncomfortable and could hurt yourself. Warm clothing and solid boots are the priority, preferably ones with ankle support and thick soles.
A sturdy comfortable and preferably waterproof rucksack to keep other equipement in such as camera, spare batteries, food/drink etc.
A pair of thick leather gloves can be useful. In some places chemicals, sharp glass and used needles can be a problem.
Most important of all, Use your head at all times.