As mentioned, these three technologies have VERY different purposes. It makes no sense to compare them.
- Remote Method Invocation (RMI) is a protocol used by Java to communicate between different processes.
- Java Persistance API (JPA) is a mini-language that persistence frameworks (eg Hibernate) use to work with the database.
- Socket is a point of communication between processes through a network of computers. It is a low-level concept, including RMI uses sockets.
Think about what you want to develop and study the relevant technologies calmly! Do not try to learn everything at once. Any questions, we are here:)