It may involve both depending on the problem.
If you are working on an existing known problem then that is one thing, but if you are working on something that isn't really as specific, then part of the research will be to make your own problem in your own mind a lot more specific.
This needs to be done for any problem you have and the simple act of making the problem absolutely crystal clear (especially in a few contexts) is one of the critical things in solving a problem.
Think about situations that start out as largely informal ("I wonder if I can find a way to make this more efficient") and then slowly they become very formal ("How can I minimize this value of lambda given these specific constraints assuming a global bounded error under assumptions 1, 2, 3...")
This is especially significant in big problems when you have a good informal idea of what you want but don't have enough technical experience to make it clear.