Idk the specifics of your loan options, but generally you should try to get subsidized loans until you reach the limit before switching to unsub, because yes, it applies to undergrad as well.
When you start dental school, you will apply for a grace period because you will again be a full time student; you won't need to make payments on your undergrad loans while in dental school. The interest accruing during this time on subsidized loans will be paid by the fed govt, while the interest on unsub loans will continue to accrue as it did during undergrad, will be capitalized at the end, etc.
**This is all in regards to federal loans (called Direct Loans now?), NOT private. Private loans have different rules.
This is all to the best of my knowledge... I'm not a financial aid expert, and I recommend you discuss it with a fin aid counselor at your school if possible. You can also find out a lot by googling, looking here
https://studentaid.ed.gov/sa/types/loans, etc.