Oxidation of alcohols can be carried out by a variety of reagents.
The most common mechanisms you'll study in your organic chemistry course involve Chromic Acid H2CrO4, Pyridinium Chlorochromate PCC, and Potassium Permanganate KMnO4.
The video below shows you how each of these mechanisms will react with primary alcohols to form an aldehyde or carboxylic acid, and a secondary alcohol to form a ketone.
(Watch on YouTube: Alcohol Oxidation Mechanism. Click cc on the bottom right for video transcript)