Hogwarts castle was built by the original founders - Godric Gryffindor, Helga Hufflepuff, Rowena Ravenclaw, and Salazar Slytherin.
The exact date is unknown, but from what Hermione says in Chamber of Secrets it was at least 1000 years ago (and she would know, having memorised Hogwarts: a History).
This would put construction at sometime in the 10th or 11th Century, the Middle Ages in Europe. We also know that Hogwarts is somewhere in the Highlands of Scotland (taking into account several sources, not least the journey time from London, the fact that they always travel north to get there, and of course the geography around the castle).
In the mid 900s AD Scotland and England had an amicable relationship, although this had deteriorated by the turn of the century and there were several military campaigns conducted amongst several Scots fighting for their own crown. This was the time of Duncan and MacBeth, heroes of the famous Shakespearean play. Needless to say, with all that was going on, it is likely that the wizarding society present in the British Isles kept itself isolated from Muggle politics. This is probably one of the reasons Hogwarts was built in the Highlands, which were sparsely populated. With the addition of some magical concealment, it would not be hard to keep non-magical folk away from the castle.
As for resources, we don't really know much about magical construction. Muggles at the time were building great castles themselves across the country, so it's not really that hard to imagine a small group of witches and wizards doing the same, albeit with magic in place of manpower. Rock was mined from the ground; wood from the forests. Glass and metal could be forged in magical fire, or transfigured from other materials. Earth and stone can be levitated into place and bound magically. I can imagine the groundwork for the castle being produced in a relatively short time; it could be that Hogwarts was originally a small project, which was added to over the years as more students arrived. The magical population is relatively small; in the Middle Ages it would have been even smaller.
We know from Hermione that the castle today is unplottable, and that a Muggle would see nothing but a dangerously crumbling ruin if they set eyes upon it. I think it is reasonable to assume that these basic concealments have been on the castle since its construction, and the spells were expanded whenever more buildings were added.