Many students seek graduate degrees in areas outside of their bachelor's degrees. Most programs consider the student's experience, academic background, and interests in determining whether to accept him or her. Undergraduate major is an indicator of a good match to a program, but is not the only indicator. The key is to demonstrate that you have the requisite experiences and match the program. So, if your BA is in Math, for example, and you wish to apply to a master's program in Biology, it would be a good idea to take some science courses to demonstrate that you have a basic science background as well as the capacity to succeed in science.
Majoring in a field isn't necessary, but an applicant must show interest and aptitude for the chosen field. How do you show interest and aptitude? Take a few classes (and do well!), get some applied experiences (e.g., volunteer at a social service agency if you want to enroll in a social work or counseling program), and take the Graduate Record Subject Exam (if offered in your field - and, of course, do well).
Graduate programs want to see evidence that a student is interested in a particular field, has a rudimentary knowledge base, and shows promise in fulfilling degree requirements. They want to know that you can get through their program. In your application draw attention to any courses you've taken or experiences that illustrate your interest or competence in the area to which you aspire. Explain why you're making this step -- this transition from one field to another -- why you have the background to do so, and why you will be a good graduate student and professional.