I am sure there are writers who never socialise with other writers, who never go on Twitter, Facebook or any other social media sites, who don't join writing organisations and classes, who simply write a book and get it published. I'm sure they exist. But it's so much easier to get published if you network. In my opinion a would-be writer ought to be involved with most of the following...
Writing classes - you meet other would-be writers who may become your critiquing partners. The tutor should be published, have regular contact with the publishing world and be also to pass on some inside info.
Writing magazines - sources of information on courses, agents, writing tips etc.
Writing societies - offer chances to meet with other authors, agents and publishers
Writing conferences - there are usually chances to meet with other authors, agents and publishers and have 1-2-1's about your work
Literary festivals - most festivals have speakers from the publishing world, whether agents or publishers. It's very bad form to thrust your ms under their noses; however, you can write to them later mentioning their talk.
E-newsletters - you can sign up to The Bookseller or book2book and get all the publishing news into your inbox.
Twitter - follow agents and authors, start making contacts.
Facebook - the same, although Twitter seems easier to make contact.
Blogging - establish a web presence early.
I wasn't internet aware when I was looking to get published so I didn't use the last four, although I use all of them now. Of the others, I joined classes, went to lit fests and conferences, did everything I could. By the time I was looking for an agent I'd already met about ten at various events and signed with one of them. I'm always amazed when people act as if I have a hotline to special info - I don't. I subscribe to the newsletters, read the magazines, and generally stay connected.