Planet orbits: what's the difference between gravity and centripetal force?
Simple answer: gravity is a centripetal force, and can be envisaged clearly as such in Newtonian mechanics.
Centripetal just means a force that is "radially inwards" ("directed towards the centre"). The electric force between two objects of opposite charges, for example, is also clearly centripetal. (It's slightly harder to define "centripetal" for the magnetic force.)
Your astronomy teacher is referring to Einstein's theory of general relativity. His description is loosely an overview of the topology (fabric) of space-time and how it interacts with matter/energy - the manifold is however 4-dimensional, not 3D.
In fact, test particles (particles which do not really disturb the gravitational field) in general relativity follow a geodesic. This is effectively a generalisation of a straight line (shortest route) of normal Euclidian space to the curved space of GR, and may be seen as the source of centripetal force in Newtonian physics.
A centripetal force is a force directed towards the centre. It's just a characterisation of an existing force. "Centripetal" means "towards the centre" in Greek.
So, in the solar system, the sun exerts a gravitational force towards itself, and it is a centripetal force.
Regarding your other question: how does gravity work? According to general relativity, energetic or massive objects distort space, so that other objects passing through the distorted space do not go straight, but bend their trajectory. From their point of view, they experience a force (gravity), and consequentially an acceleration which changes their trajectory. So according to general relativity the medium through which gravity acts is actually the distortion of space. This is what your astronomy teacher called "a 3D blanket".
Instead, according to Quantum Field Theory, forces are mediated by appropriate particles actually moving through space. Gravity would be carried by particles known as gravitons.
In both these theories, there is no action-at-a-distance, so body don't exert forces on one another instantaneously, but there's always something "in the middle" that carries or represents the force.