Replication includes tutorials that you can use to learn how to set up and run replication topologies using SQL Server Management Studio.
In the replication tutorials, "Publisher" refers to the server that contains that source data being replicated and "Subscriber" refers to the destination server. The Publisher and Subscriber may share the same instance of SQL Server, but it is not a requirement. For more information, see Replication Publishing Model Overview.
Most of the tasks shown in these tutorials can be performed programmatically. For more information, see Developer's Guide (Replication).