Graduate school admission with a degree in a different field
Graduate programs care far more about your background and preparation than about which field is listed on your degree.  Even if the application requirements list a degree in X as a prerequisite, the department will very likely make an exception if you have a degree in another field but can demonstrate that your background is equivalent.  How likely this is depends on which of the three cases listed above you are in:


Extensive formal study of X puts you in good shape.  You should discuss this issue in your statement of purpose and make sure your letters of recommendation address it.  Letters from people in field X who say your background is appropriate would be more convincing than letters from those in other fields.
The overall strategy is the same as in the previous case, but you'll have to work harder to make a compelling argument for admission.  It's certainly possible to get admitted, but the rest of your application will have to be convincing enough to make up for not having courses in X on your transcript.  When you request letters of recommendation from faculty in field X, you should specifically ask whether they are prepared to endorse your background as sufficient for admission (to avoid getting letters along the lines of "this applicant is smart and hard working, but I don't know much about their background and preparation"), and you should strategize with them about how you can present your background in the best possible light.
It's unlikely that you can be admitted at this point, for two reasons.  One is that many people think they would like to study a field that's new to them, only to discover that it's more difficult or less interesting than they had expected.  The other reason is that time in graduate school is a limited resource, and it's inefficient to use it to study prerequisites.  You would generally be allowed to fill in a few gaps in your background, but not to begin studying the field from scratch.  Instead, if you want to change fields you can begin by taking individual courses at a local university.  It's also sometimes possible to enroll in post-baccalaureate programs aimed at helping people change fields (but the availability of such programs varies, depending on the field and location).


There is a notable exception to #3, and that is the handful of fields where there is no meaningful pre-graduate coursework in those fields. For example, there are vanishingly few undergraduate programs in epidemiology, and as such there is very little expectation that you have taken specific coursework, and nearly the entire admitted graduate class will be "switchers" of some form or another. In these cases, what is likely most helpful is to be able to articulate how your present program and course of study has led you to be interested in, and prepared for, further coursework in that field.