Working on some large FOSS project will teach you most of the skills, though maybe don't specialize too much. Some people seem to mostly fix bugs, others design and half-finish stuff before switching to something else, etc. It's best to know the full lifecycle in order to have relevant experience for all situations.
My best advice is start writing code to solve problems in your own life. Basically write apps to solve your own problem. A great example currently on hn is an expense tracker. That sort of stuff is great because you can showcase your front end and back-end skills, along with design and refinement. Then maintain that project for a while to show a history, which demonstrates your skill of maintenance. That sort of thing Will get you hired by me as a junior in a heartbeat.