Some people seem to have an ability for it.
Others use divination techniques and can achieve it.
A simple way to learn this:
Place yourself into a meditative state. Calm and clear your mind.
Ask deity, angels, spirits, beings whatever you work with to guide you.
now in this positive alpha state take your pendulum or scrying device. I use a ring on a thread.
Ask simple yes/no questions. Start with control questions.
Keep the pendulum still and in your dominant hand.
Ask a control question: Do I live on the bottom of the sea? Note how the pendulum swings. Ask another "No" question and get a baseline of how the pendulum swings, for me it goes side to side.
Ask a "yes" control question. Note how the pendulum swings. Get a baseline for what yes looks like. It goes back and forth to and away from me.
Then ask some yes/no questions you wantto know and note the results.
If the answer is unclear my pendulum tends to do a circle.
You can advance this by making a board with answers or letters and numbers etc.
That is just one idea, there are others using things like black mirrors, crystal balls and of course tarot cards, or even playing cards.
it takes time and some effort, at least for me, but the results can be quite remarkable.