The normal way to deploy code to alfresco is via an "AMP" file. Which is a simply a zip file with some structure containg classes and config. The AMP files are processed by the MMT tool to be merged into the alfresco.war file.
However if you simply want to deploy a JAR then simply stick it onto tomcat's shared lib path. If you are using the alfresco installer then it will already be configured, if not then you need to configure the catalina.properties.