Both of the words are kind off synonyms or meaning of each other
The difference is one of register
Loquacious is from a very high register. Talkative is a normal mid-register word.
Looking around the web, most of the actual use of "loquacious" is ironic.
The worst thing for a writer is to be loquacious with verbocity.
I have also seen other advice that one should avoid words like "loquacious", as you will seem to be trying to sound smart (by using rare words) but you will actually sound pretentious.
Learners should normally use "talkative".
There are two subtle differences between talkative and loquacious.
You can be called talkative without necessarily being attributed a characteristic of your personality. In other words, take the following example, "Sally always gets so talkative after she drinks coca-cola."
Sally is not always talkative, but only after she drinks coca-cola. It can be a temporary condition, in other words. Talkative also has a slightly negative connotation.
If you are called loquacious, then it is a personality trait and not something that is likely going away anytime soon. To the contrary of "talkative", loquacious can have a positive connotation. Though more often than not, it is used in a sardonic sense, like you're trying to use a euphemism.
"Lets say, Sally is loquacious.. she tends to ramble especially when she's nervous."