You'll have to get a visa from the Egyptian Consulate in the Diplomatic Area (West Bay). It usually takes 1 to 2 days for the tourist visa to be stamped in your passport.

There are plenty of hotels in Cairo depending on your budget and style of travel. Just look up any online guide.

Why are you traveling only to Cairo? If you're flying all the way to Egypt, you might as well visit Alexandria, Luxor, Aswan and Abu Simbel as well. All are definitely worth visiting. And if you can fit in a nile cruise for 3 days, you'll have the trip of a lifetime.