Some muskets did have a form of sight - the Charleville musket used by French troops during the Napoleonic Wars had a foresight - but others, like the various firearms referred to as 'Brown Bess', didn't. Many hunting and target rifles dating back to the early seventeenth century have sights, but these are obviously a different - and far more expensive - beast than a common infantry musket!
There were sights quite early: you can see that the forked catch or sear that held the bowstring on crossbows also made a rear sight, so the concept was around for quite some time ( I have also seen early crossbows with actual, obvious sights, but given the fact that crossbows were used into the 18th c. for hunting, I do not know how many of them actually predate the use of firearms). For guns, in the Zeugbuch of Emperor Maximillian I, circa 1502, there's a soldier aiming a matchlock with sights. Interestingly, there are also soldiers aiming things that could be very large matchlock guns or very small cannon, and these don't have sights, probably because they were too heavy to be held in the arms and aimed.
A musket generally did not have a rear sight. Though StoryWonker is correct to say that French ones, among others, had a front sight or a bayonet lug that could serve as a front sight, muskets were not supposed to be carefully aimed, because it was somewhat pointless. They were meant to be loaded quickly: a paper cartridge held both powder and ball. Some of the powder went into the pan of the lock, for priming, the rest went own the barrel, and the loose-fitting ball , with the paper wadded above, was rammed down to sit on the powder charge. Because the powder charge would vary from shot to shot, and the loose-fitting ball would come out in a different way for each shot, it was impossible to precisely predict where the ball would go- and predicting where the ball is going to go is , in essence, what sights do. Muskets would be "presented", or pointed. It was found that rapid-fire volleys of balls from a line of soldiers thrown against a line of other soldiers was more effective than slow straggling fire from slow-loading accurately-aimed rifles, until technology advanced in the mid 19th. century with percussion caplocks and Minie bullets.