You can put some dawn dish soap and water in a bowl and then place a light over the bowl of soapy water and the the fleas will be attracted to the light and jump into the soapy water and the soap will kill the fleas.
You can buy a ready made flea trap at Walmart or other stores too that has a light on it and does the same thing basically but with sticky pads instead.
If fleas are in your carpet you can kill them by sprinkling salt into the carpet and leave it sit in the carpet for at least 2 days.
Then vacuum and steam clean the carpet and the dead fleas will come out of the carpet.