Regarding Muggles, I actually think it's possible they can access Platform 9¾ through the barrier. Over at Pottermore, J.K. Rowling writes this:
[T]here have been minor problems over the ensuing years, such as witches and wizards who have dropped suitcases full of biting spellbooks or newt spleens all over the polished station floor, or else disappeared through the solid barrier a little too loudly. There are usually a number of plain-clothed Ministry of Magic employees on hand to deal with any inconvenient Muggle memories that may need altering at the start and end of each Hogwarts term.
Pottermore - book 2 - chapter 5 - Flying to Hogwarts
Think of a Muggle picking the barrier between platforms 9 and 10 to lean against to read the paper on what happens to be Hogwarts' return to school (Sept 1). Perhaps he would stumble on Platform 9¾
As I said in my comment, Dobby, a house-elf, has magic of his own that is different from wizarding magic. House-elf magic is very powerful; Dobby took a great risk performing the magic that sealed the barrier to Platform 9¾ without permission from his master, Lucius Malfoy (I believe it's safe to assume Lucius did not give Dobby permission to pull this stunt, seeing as Dobby was being secretive about why Harry should not return to Hogwarts and the Chamber of Secrets plot). It looks like sometimes house-elves can use their magic without having to have their master's permission.
‘Well,’ said Fred, ‘put it this way – house-elves have got powerful magic of their own, but they can’t usually use it without their masters’ permission. I reckon old Dobby was sent to stop you coming back to Hogwarts.’
Chamber of Secrets - page 27 - Bloomsbury - chapter 3, The Burrow
I do see that Fred thinks someone sent Dobby to seal the barrier, but the overall story in Chamber of Secrets demonstrates that Dobby was acting alone to protect Harry on his own volition. Dobby is a free-thinking house-elf and it's entirely plausible that he would set out on his own to "save" Harry's life.
Dobby used house-elf magic to seal the barrier to Platform 9¾. We don't know enough about house-elf magic from canon to know exactly the spell or jinx he used.
In 3407 pages (UK) and 4195 pages (US) spanning books one through seven, the specific type of magic Dobby used to seal up the entrance to the platform is not discussed or referenced. Having read the 3407 and 4195 pages of Harry Potter canon, both US and UK versions, I can say that the type of magic Dobby used is not exactly identified as far as I can recall. House-elf magic is not mentioned in Fantastic Beasts and Where to Find Them, Quidditch Through the Ages, or Tales of Beedle the Bard. Having pillaged those sections of Pottermore that are available to the public, I can note that house-elf magic is, again, not mentioned, specifically in the segment Flying to Hogwarts in the Chamber of Secrets section. I have never encountered J.K. Rowling addressing specifically what kind of magic Dobby uses to seal up the barrier to the platform in an interview or podcast. I have watched the eight Harry Potter movies and the type of magic Dobby uses to seal the platform is not mentioned or identified. Of course, please correct me if I'm wrong.