Lots of folks look for work while they're at work. While not always advisable, you may find yourself setting up interviews or printing resumes at the office. And you may accidentally leave a copy of your resume on a shared printer. Or in the copier. And your job search may come to your boss's attention.
If your boss asks you if you're looking around, you should own up to it. If you're pressed to reveal the reason, be diplomatic. You can talk about wanting a higher salary, or seeking new challenges, or a total career change. Avoid saying anything insulting to your supervisor or about the company, even if its future looks dim. Your tactful honesty could prompt a discussion about a raise or different responsibilities. It could also earn you your walking papers.
Remember, if you are employed in a state where employment is at-will, you can be fired for many reasons, including looking for another job. It's best to conduct your job search on your own time.