The short answer
Yes. Compasses are still widely used. Hikers, hunters, orienteering competitors, surveyors and military trainees all carry them, and many ships and aircraft keep a magnetic compass as a backup to electronic systems. A compass has one big advantage: it needs no battery, signal or map app to work.
Hiking and backcountry travel
Many hikers carry a compass with a paper map as a backup to their phone. Phones can run out of battery, lose signal or get wet. A compass and map let you set a bearing toward a trail, a road or a stream even when the screen is no help. Carry the map and compass, and practice using them before you need them.
Orienteering and land navigation training
Orienteering is a sport in which competitors use a map and compass to find marked points across rough ground. Military and outdoor training programs still teach map and compass work. Learning land navigation skills with a map and compass builds confidence that a screen cannot give you, because you are reading the terrain yourself.
Ships and aircraft
Modern ships and aircraft rely mainly on electronic systems for navigation. Magnetic compasses still have a place as a standard backup, and larger ships often use a gyrocompass as their main heading reference. A gyrocompass finds true north using a spinning wheel rather than a magnetic needle.
Phone compass apps
Smartphones contain a magnetometer, a sensor that reads magnetic fields, and many map apps show a compass on screen. These apps are handy for rough direction. A common question is: can I use my phone as a compass? For casual use, often yes. However, phone sensors need calibration, can be thrown off by metal or magnets nearby, and depend on a working battery.
When a compass is still a good choice
For a short walk on a well-marked trail, a phone is often enough. For longer or remote trips, a compass and a paper map make a reliable backup. The best time to learn is before you need it, because reading a bearing under stress is much harder than practicing at home.
Summary
Compasses are still in use for hiking, orienteering, military training and as backups on ships and aircraft. Phone apps have taken over some everyday uses, but a compass with a map still works without power or signal, which is why many people keep one.