The first one is it's mod unique ID.
The second is a class that will be created by your decoder. (It needs to store all the information you want accessible on the other side(Server/Client)).
The third is a BIConsumer that takes in an instance of that class and a PacketBuffer. Use this to write the data sent over the network to the PacketBuffer.
The fourth is a Function that takes in a PacketBuffer and returns an instance of the class. Use this to read the data from the PacketBuffer into a new instance of the class.
The fifth and final parameter is a BiConsumer that takes in an instance of the class and a Supplier of NetworkEvent.Context. Use this to handle the information you sent over whether it be syncing data to the client or performing an action on the server.