On 34 minutes Lee Hughes handled the ball in the box, so Swindon were awarded a penalty. Jack Smith took the kick and scored to make it 2-0.
Oldham thought they had scored just before half time, but the goal was ruled out for offside.
On 61 minutes Simon Cox came close to scoring, but his shot hit the bar instead.
Overall a good win for Swindon which moves them up to 15th in the League One table ahead of Tuesday evenings trip up the M5 to Walsall.