It depends on what you want to hide:
The whole course: open the Share tab and click Move to draft. Learners lose access right away and the link stops working. Your content and learner progress are kept, so you can publish it again anytime.
The course from your portal catalog only: in Share › Links, turn off Show in portal catalog. The course stays reachable by its links.
Work in progress on a live course: you do not need to hide anything. New pages and edits stay hidden from learners until you click Publish changes.
See Draft & Publish.
FAQ
Can I hide one course in a learning path and keep the others live?
Yes. Move that course to draft. A draft course is left out of its learning paths, so learners do not see it in the path at all. The other courses in the path stay live. When you publish the course again, it shows up in the path again.
❓ Please reach out via the Blue Chat bubble in the bottom right corner of your screen if you have any questions about hiding a course.