Just in case you don't know what an object is, in Object Orientated programming, generally OO for short, data comes along with the functions you use on that data. ie. a number object will have a place to store the number and a load of functions that do something with it. For instance in OO you would pass the number object a message to return the number, or add another number to it or countless other things. The class determines how the object works, ie. what variables it needs and what functions. This definition does two things, it describes an interface so that other objects know how to talk to the object and, like Iron Cross said, it provides a blue print from which to create initial copies of the object as they are needed by running programs.
If your going to be pedantic about OO you would not want global variables within an object as that sort of destroys the point of OO programming. You define the interface to an object so that you can pass it messages and get an expected result, what's actually done within the object doesn't really matter as long as it gets the job done and hence can be changed at any time without impacting the rest of your code. However if you rely on outside access to the internal structure of your object, a global variable for instance, changing that structure can cause real headaches with the rest of your code. however people use these things because they provide real shortcuts in terms of algorithm design.
Some languages allow this and some don't or at least they say they don't but if you are using a C derivative you can basically do anything you want with memory locations through the use of pointers.