In order to team up and do missions with someone you have to communicate before you start the mission. You have to rendezvous somewhere, put yourselves in an active team, and then embark on the mission.
As for not having friends online, I would say that 90% of my friends are from my fleet. A fleet is a group of like minded players that get together under one banner to take on the game as a group. You can search for fleets under the social tab, or you can search here http://sto-forum.perfectworld.com/forumdisplay.php?f=79
There are also alot of the time fleet recruiters shouting out in social zones. If any of these fleets sounds interesting to you, right click their name and select "Send Private Message." and then type into the chatbox field below.
Another option for making friends is to join one of the Global chat channels listed http://www.stowiki.org/Global_Channel_Directory. Some of theses are not social, but a few of them are, and will allow you to ask questions and socialize with others that have the same goals as you.
Regarding the query about cooperative gameplay, yes, any mission can be played as a team.
However this is not regularly done unless for new player help or to create epic video productions out of mission replays.
If you want to meet and work with other players in a team / task force then the best place to do is run a few PvE queue missions. At lower levels the selection is limited but at level 44 onwards you can participate in Special Task Force missions, but be warned those missions require a bit of homework to learn the mission objectives and special tactics required to beat the game.
For all other types of in-game socialization that's what fleets and global channels are for (as above-posted).
If you're lonely then hang out on Zone chat on Earth Spacedock (newbie friendly) or Deep Space Nine (warning: more mature topics often appear)
Should you need in-game assistance feel free to add me @carmenara as well. I play this game specially for the STO equivalent of "pilot training" - the techniques for endgame PvE and PvP content can be somewhat unintuitive at first until a certain level of knowledge is gained from extensive trial and error in game mechanics.
STF Flight Instructor since Early 2012. Newbies are the reason why STO lives and breathes today. Do not discriminate.