Theory:

Precautions to retain the magnetic property:
The bar magnets should always be kept in pairs separated by a piece of wood, keeping the unlike poles on the same side. Also, a pair of soft iron pieces should be placed across their ends.
 
9 (1).svg
Wood separating the bar magnets
 
A piece of soft iron is kept across the poles for a horseshoe magnet like a magnetic keeper.
 
horseshoeMagnet.png
Soft ironcovers the poles of the magnet
 
The magnets should be kept away from the electronic gadgets like cassettes, mobiles, televisions, music systems, DVD's, compact disks (CDs), and the computers. When a magnet is placed near these electronic gadgets, it affects the magnetic property, and hence spoils the device as well as the magnet.
Uses of magnets:
1. Magnets are so strong that it is used to lift heavy loads. In a junkyard, a crane attached to a magnet is used to carry heavy metal loads. Magnets also help to separate magnetic materials from the junk.
 
shutterstock_1651414597.jpg
Junkyard crane
 
2. Even playing toys and dolls have magnets in them.
 
40629007973_43c7d43c98_b.jpg
Magnetic toys
 
3. In magnetic loudspeakers, magnets are used to produce sound.
 
speaker-35557_1280.png
Loudspeakers
 
4. Magnets are used in compasses to show the north and south directions. Mountaineers and hikers use the compass for finding direction in unknown places. Magnets are used in ships and aeroplanes for navigation.
 
nature25920001280jpg.jpg
Compass
 
5. The usage of magnets plays a vital role in small electric motors and some door locks.
 
BeFunky-collage (2).jpg
An electric motor and an automatic door lock
 
6. The other simple things which use magnets are bags, pencil boxes, stickers on refrigeratorspin holders, and phone covers.
 
BeFunky-collage (3).jpg
Bags, refrigerator magnets, pin holders, and phone covers (See the images in the clockwise direction)
Reference:
https://upload.wikimedia.org/wikipedia/commons/9/9a/Automatic_door_lock_system_846.jpg
https://upload.wikimedia.org/wikipedia/commons/f/f4/DC_Motor.jpg
https://live.staticflickr.com/1263/1401210289_4c0f08e1b9_b.jpg
https://upload.wikimedia.org/wikipedia/commons/6/62/Mobile_phone_case.jpg