What exactly was the difference between these two positions? I've tried researching the subject and got lost due to military jargon.
From the wartime Army Officer's Pocket Companion:
The bureau duties of adjutant-generals and assistants are: publishing orders in writing; making up written instructions and transmitting them; reception of reports and returns; disposing of them; forming tables, showing the state and position of corps; regulating details of service; corresponding with the administrative departments relative to the wants of troops; the methodical arrangement and care of the records and papers of the office.
The active duties of adjutant-generals consist in establishing camps; visiting guards and outposts; mustering and inspecting troops; inspecting guards and detachments; forming parades and lines of battle; the conduct and control of deserters and prisoners; making reconnoissances(sic); and in general, discharging such other active duties as may be assigned them.
For aides-de-camp:
These are ex-officio assistant adjutant-generals (Act March 2, 1821). They are confidential officers selected by general officers to assist them in their military duties. A lieutenant-general appoints not exceeding four in time of war, and two in peace, with the rank of lieutenant-colonel. A major-general appoints two, and a brigadier-general one. The act of August 5, 1861 enacts that "during the existing insurrection," the president may appoint aides-de-camp at will, with the rank of captains, majors, lieutenant-colonels, or colonels, upon the recommendation of the lieutenant-general, or of a major general commanding an army in the field. These appointments to be recalled whenever the president thinks proper.
Aides-de-camp are attached to the person of the general, and receive orders only from him. Their functions are difficult and delicate. Often enjoying the full confidence of the general, they are employed in representing him, in writing orders, in carrying them in person if necessary, in communicating them verbally upon battle-fields and fields of manoeuvre(sic). It is important that aides-de-camp should know well the positions of troops, routes, posts, quarters of generals, composition of columns, and orders of corps; facility in the use of the pen should be joined with exactness of expression; upon fields of battle they watch the movements of the enemy; not only grand manoeuvres(sic) but special tactics should be familiar to them. It is necessary that their knowledge be sufficiently comprehensive to understand the object and purpose of all orders, and also to judge, in the varying circumstances of a battle-field, whether it is not necessary to modify an order when carried in person, or if there be time to return for new instructions.
So let's unpack this a bit. Both adjutants and aides-de-camp assist their commanding officer with administrative and communicative tasks. The first distinction is that, while adjutants existed at the regimental level, only generals had aides-de-camp. The second distinction is that the adjutant is an ordinary post, somewhat analogous to the chief-of-staff in the 20th century. The aide-de-camp is a temporary, at-will appointment, and the officer in question is much more attached to the person of the general, functioning as a sort of private secretary-cum-emissary on his chief's behalf.