A mechanic is someone who repairs vehicles. If your car breaks down, a mechanic would fix it for you.
In the past, there would be a 'pump attendant' who put the fuel into your car. But nowadays, pumps are all self-service, so the only people who work at a gas stations/petrol stations are the cashiers who take payments.