Talk with an academic adviser if you are still an undergraduate. If you have enough credits, have fulfilled enough requirements or the graduate course you wish to enroll in is important to your educational or career path, you may be eligible to take a graduate course without a bachelor's degree. Your academic adviser will know your college's policy regarding undergraduate enrollment in graduate courses, and will be able to go through the process for you to enroll.
If you are already enrolled in a graduate school, check to see if there is a minimum credit requirement. You may be able to only take one graduate class a semester without special permission. If you have to take more than one class to fulfill the minimum requirement, contact an academic adviser. Explain your circumstances and why you need to only take one class. Your academic adviser might be able to waive the requirement.
If you have already earned a graduate degree or have a bachelors degree but do not wish to become a full-time graduate student, contact the graduate school you wish to attend. The school might make allowances for people wishing to supplement their education without being a graduate student. If it is allowed, follow the instructions you are given to successfully enroll in one graduate class.