It depends on where the object ,wich is moving from X, originally was:

a) inside X => из X
b) on X => c X
c) near X => от X