Step 1 is to vacuum every place you can reach. Move furniture to vacuum underneath and behind. Dispose of bag. Buy a good flea spray and use underneath beds and chairs. Then use fogger or flea bomb.
First treat your pets, or the fleas will just reinfest the carpets again ! Next work a mixture of Borax and salt well into your carpets, leave overnight then vacuum