The most common way to submit code, especially for new OpenMRS developers, is to submit a patch as an attachment to a ticket.
In most cases, developers are working against a ticket. In this case, you usually have a local copy of code to which you have made changes. To submit a patch, you may use your IDE (e.g., eclipse, IntelliJ, etc.) or the subversion command line to generate a patch file and upload it as an attachment to the ticket. See the Patches page for more detail.
Some developers (full or partial committers) have write-access to the repository and can commit code directly to the repository. If you are committing code to the repository, make sure you have read our Subversion Code of Conduct and Using Git. If you have any doubts about whether or not to commit code to the repository, please ask us on the developers mailing list or on IRC.