Today, people tend to view militias as crazy secluded groups of people with a fascination with guns and anti-government viewpoints. Was this at all the same in the early parts of US history?
No, they were an entirely different institution. Local militias, in colonial America, were something like the reserve forces of their day. All able-bodied men ages sixteen to sixty were required to join the county militia. The county militia would be made up of several different regiments, and the county militias were administered by the colonies they were in.
How it usually worked is that, for a couple of weekends every year, usually in the summer, all the men in that part of the county would have to meet somewhere out in the wilderness and do training exercises for the whole weekend. Camping out, shooting, all that kind of stuff. It wasn't necessarily something people looked forward to doing, and would figure out ways of getting out of it, but if you were required to go and didn't show up, you would be fined or made to pay back your debt in some other way.
It was a bit more useful than a camping trip in the summer, because a lot of the stuff you were trained to do would come in handy in day to day life, particularly in areas that still had run-ins with the Indians. That was their original purpose, was to train the men to help them defend against regular Indian attacks. By the time of the Revolution, that wasn't going on so much, but it was still a threat to be aware of.
But as a member of the militia, you were obligated to fight in any war if it came sufficiently close to where you lived. And that happened with some frequency. Militia men from New York and Massachusetts marched north to fight in the French and Indian War. They had done the same previously in King George's War. And they did the same again during the Revolutionary War, as the war front wound its way through the country.
So when the founders were writing the Constitution, the colonial government had never had a permanent active duty fighting force before, what they termed a "standing army". They believed that the appropriate defense were local militias. Essentially, reserve forces based where they lived. Only in times of active war would an active duty fighting force be recruited. In all other times, the defense of the new United States would be turned over to the local county militias.