The two options you give are not mutually exclusive.
In some universities some members of the faculty will have summer internships, you can ask staff about such opportunities. Since you are studying Computer Science the internships are likely to be somewhere between research and implementation.
If you are interested in research-proper or you are still finding out what interests you then it is also good to approach faculty. However, stating you are simply interested in research will not provide them with a way to help you. I suggest reading some papers related to a course you enjoy and start looking for gaps in the research, thinking of - very small - improvements you can make and - then - discuss with a member of faculty who may give suggestions on how to approach the problem and offer to look at any progress you have made. This second approach makes it much easier for faculty to help you.
This second option is not coming up with a research idea yourself, but instead finding a small gap and getting the advice of staff on where the research may lie (that you could feasibly conduct).
I must stress that it is important to be realistic about what you can do; faculty will be more receptive if what you want to do is manageable (i.e., you show them you're a grounded type of person).