Sometimes I find it helpful to just take a break and read more from the genre I'm trying to write, so I get inspired to write more and improve. (the downside is I might also get discouraged by reading something really good––it's a double edged sword).
^I'm the same way when it comes to reading something good! It can either be incredibly helpful or incredibly discouraging. It helps me to talk to somebody about what I'm working on. Preferably one of my writer friends, because I find that they can ask me questions about it or point things out to me that I didn't realize,and I find I get excited about it all over again.
Definitely access material in that same genre. You could also look for similar material outside of the writing world. Say you're writing poetry and you want to improve the way you're capturing imagery. Head to a museum, or go for a walk, and try to take in a different form of art/descriptive work through a visual medium. You could even put on a movie of the same genre of what your writing (maybe Fantasia or something similar if you're working with poetry) and see how a different author/director works with the same kind of idea you want to play with.
I agree - staying entrenched in that same genre or going back to writing that inspires you is crucial. I'll also watch movies that might have some kind of similar character/plot/energy/setting or something like that as well to get me inspired. Of course, though, taking a break and jamming out to music is always a great idea!