To solve a flea problem, you will need to tackle it from all sides. You will need to address the fleas on your pet, as well as kill the adult fleas, eggs, and larvae from your entire apartment. Some of these suggestions also already appear in other answers.
The first step is to treat your pet. Bathe them with flea and tick killing shampoo. Then comb them thoroughly to remove as many fleas and eggs as possible. Apply flea medicine to them or put on a flea collar. This will help prevent your pet from being eaten alive. You may need to try different types of medications if the one you are using does not work. The fleas will then generally leave them alone.
Fleas will also target humans, so be sure to clean all linens, clothing and bedding if possible. Hot water works best to kill off the eggs and larvae which may be there. You should also vacuum every carpet, and be sure to clean every crevice thoroughly. The furniture should also be vacuumed. Be sure to pull up the cushions and vacuum. It is also a good idea to pull out the furniture and clean behind and underneath. Once you are done vacuuming, put the bag into a plastic garbage bag and immediately dispose of it. You can also spray flea killer directly into the bag so they don't escape. After everything has been cleaned and vacuumed, then move on to steam cleaning. Make sure to use hot water when cleaning. The hot water is more likely to kill the eggs.
Those steps will get rid of around 90% of the fleas. The remaining ones will be much harder to deal with. Their lifecycles are extremely fast. It only takes about 3 days for a flea to reach maturity and start breeding. When I dealt with them in my old apartment, the only thing that was able to completely get rid of them was a flea trap. A flea trap uses a small night light light bulb, and has a piece of sticky paper underneath it. The fleas will jump towards the light, and then fall through a plastic grate onto the paper and get stuck there. Put the trap in an area where you have noticed flea activity, and you will see that the paper will be completely covered with hundreds of fleas within a few days. Replace the paper when necessary, and your flea problem will eventually be solved. When you get your trap, make sure to get some extra refills. They get used up pretty quickly. Also keep track of how many fleas are being captured. At first, there should be quite a few every day. That number should decline over the span of a few days. If it doesn't then there is still a serious problem, and you should repeat the steps above to reduce their population. Eventually there shouldn't be any more fleas in the trap. Once you think they are all gone, put in a fresh refill and leave it on for at least a week to see if you get any more. There will be a few stragglers around for quite some time, and if they are not all exterminated, then they will be able to repopulate. You can also try having multiple traps around, or at least try moving it around to see if you find more.