I am new to machine learning. Suppose I train a random forest with say n decision trees. Now once the model is trained and I wish to share it with a peer over a network, how can I do that or specifically what should I share?
It depends what technology you use. Typically, you would share the whole model by saving it to a file, potentially with some meta data such as the python version you used. After sharing, your peer would load and apply it.
In python and scikit-learn, you could use pickle. See more here: https://scikit-learn.org/stable/modules/model_persistence.html
you need to save your model in a standard format like xml,yaml,json.... or use a specific format like python pickle, after that, you can share it or move it anywhere (of course under some constraints). the other way you can publish your model as web services.