To surrender peacefully, holster your weapon and press L2 to focus on the responding lawman. You’ll have the option to defuse and surrender. Once Arthur raises his hands, the lawman will approach to apprehend you. You can still turn this around at the last moment by drawing your weapon and firing at the unsuspecting lawman.
Take note that surrendering is not always an available option. If you committed a grievous crime like murdering lawmen and civilians, don’t expect to be able to surrender properly as the lawmen will want you dead instead. When things get this hot already, you don’t any choice but to escape.
Once you’re taken in, you’ll serve jail time. If you’re apprehended in the town/city near the camp, Dutch may even bail you out.