RMI is a cross between remote procedure call and mobile objects.A server-side object is created, along with a stub object. Both the server-side object and the stub implement a "well known" interface. The server-side object remains on the server, and receives and executes remote method calls.The stub is moved as a mobile object to a client. The client makes calls on the stub which makes remote calls on the server-side object.
you can get more info from the below site