Let's start with coordinate systems. A coordinate system is just a way to describe the position of an object in some space.
ROBLOX is, obviously, three dimensional, so to describe the position you need three numbers. These numbers can be interpreted as the distance along each axes, so (3, 5, 6) would mean 3 studs right (X axis), 5 studs up (Y axis) , and 6 studs forward (Z axis). This requires a point of reference, i.e where to start before applying these movements. This point of reference is called the origin of the coordinate system, and is represented by the (0,0,0) coordinate.
Those three numbers can be efficiently represented and computed upon using vectors. Which is what Vector3 class provides, a way to manipulate positions in 3D space along with common vector operations such as cross and dot product.
However vectors can only represent position, not orientation. You would think you need 3 more numbers to define orientation (the degree to rotate along each axis applied in sequence), and it would be correct, those are called Euler Angles, however to represent them efficiently and be able to make quick computations with them you use what we call rotation matrices.
These are provided by roblox with the CFrame class, name standing for Coordiante Frame, and they can encode orientation and apply rotations efficiently.
Now let's say you have a ball in position (3,0,2), as I mentioned above, this vector represents the position with respect with to the origin of a coordinate system. The default coordinate system in ROBLOX is called world space, where every object shares the same origin. However what if you need to know how far a character standing at (3,0,3) is from the ball?, you can compute it easily enough with simple math and get (0,0,1) studs from the ball. What you did there was actually convert the character position to object space, particularly to the ball's object space, and as the name implies is just a coordinate system where the origin is now the position of the ball, so everything is represented as being away from the ball instead of the world origin.
This was done easily enough since we didn't care about orientation, when you take into account orientation the math gets complicated (for those interested is just some linear algebra and trigonometry), so ROBLOX handles that for you with the methods toObjectSpace and toWorldSpace, where given a CFrame we convert it to the object space of another CFrame, or viceversa with toWorldSpace.
Inverse is used under the hood when performing those computations, as I mentioned before these computations involve linear algebra, but in layman's terms if you move an object with a CFrame, Inverse gives you the CFrame to move the object back to starting place.
4 comments
no. this is what the wiki is for.
No. A member of the community can explain it. This question falls under concepts to provide a more understandable response.
i think its too broad a question. i've seen many times where more pointed questions were closed, should aim for consistency if anything.
Note that the wiki has a section on trying to explain the difference between Object space and World space here: http://wiki.roblox.com/index.php?title=CFrame#Local_and_World_Space