There are a few ways.
For the time period of the usual season - ERAS/NRMP is one. It is used by all University programs and a large number of community programs. Programs that use this method must put ALL their positions (All-in) in the Match. Interestingly, this was changed from all positions at an Institution. So, some programs at an Institution may remain outside of the Match.
The other method is called "Prematch" or "Outside the Match". It is simply that a program may offer positions to whomever it likes, whenever it wants to and do so at it's pleasure. These are predominantly community programs (I'm speaking from the perspective of IM here. I have no idea how or if this is done for other programs).
Programs that offer their positions through the Match must also offer unmatched spots in the SOAP (Supplementary Offer and Acceptance Program) which is the week leading up to Match Friday.
If a position remains unfilled in a All-In program after the completion of SOAP, that position may be offered outside the match.
Historically, there was a tremendous amount of gamesmenship in the Scramble (the previous time of SOAP). Likewise, it has occurred to me that an interesting strategy for a program wanting to get AMGs might be to intentionally go unmatched and get all it's positions in SOAP, since there will (likely) be many many unmatched AMGs again this year.