Did I ruin my transmission driving in D3 and what is the difference between D3 and D4?

I was driving home today from work, a 24 mile drive, and was noticing that my RPM gauge was running high at 4500rpm while doing 70mph down the highway. At first I thought it might be my transmission going bad, then about 3 miles from home I realized I was in D3 instead of my usual D4. I didn't want to switch over while driving down the road since I thought it would drop the transmission like all the stories I have heard.

What is the difference between 2, D3, and D4? I just know to put it in D4 and drive. Did I ruin my transmission by driving in D3? The car is a 1997 honda civic with 98,500 miles.

D4 has an overdrive gear will is appropriate for use at highway speeds. You did not cause any damage to your transmission by leaving in in D3 you simply burned more fuel than was necessary, nothing else.

No you did not ruin it you just drove with the first 3 gears only and not using 4th
You could have changed at any time whilst driving to D4
All that has happened is that you have used more engine revs to cruise than you needed to thus using more fuel and will have created a tiny tiny bit of wear to the engine that did not need to happen.

D3 = uses only 1st, 2nd and 3rd gears
D4 = uses all 4 gears

D3 and D2 and D1 or 1 and 2 depending on what it has are meant for use when towing and/or when descending steep hllls to aid the brakes with engine braking

You have a 4 speed automatic transmission. All you did was spend more in gas for the trip. No worries. You can at any time switch from one gear to another as long as you are in the speed range for that gear.

No you did not ruin the transmission. You just burned a lot more gas.
There's no issue just changing up to D4.
The issue is when travelling fast changing down to D2 from D4.
In D4 the box will use all 4 gears.
In D3 it will only use the first 3 gears.
You instructor should gave covered all of this when you were learning.

You did not go a great distance so its unlikely there will be any damage. D3 should be used for city (stop and go) driving, while D4 is used for long distance and freeway driving. As a precaution pull the trans dipstick and first look at the fluid level. It should indicate the proper level on the stick.Second, smell the fluid. If there's a burnt smell, look at the color of the fluid, it should be red. If it is dark red to brown, have the trans serviced right away.