Flash a smile at people whenever they look in your direction. This will let them know that you are friendly and available to talk to. If they are feeling lonely, in a talkative mood, or are simply curious about you, they will look at the smile as an invitation and approach you.
Whether you are a student or someone doing a job, try to help people around you whenever you get a chance. This will not only make them take notice of you more, but will also make you more likeable. When they are not busy with their work, they will surely want to sit next to you and have a chat.
Wear good clothes. Dressing up coolly will help you to impress others and come off as cool. People like to be associated with cool people and would therefore want to spend time with you.
Look around you for people who appear to be just as alone as yourself. Approach them and try to strike a conversation. Maybe they were looking for someone to talk to just as much as you.
If you are a student, try to sit as close to someone cool as possible. You may find yourself getting far more attention that you did before.
Try finding a place away from other people to hang out at. Make sure that you remain clearly visible to people, so that they notice you. When they find you sitting alone, they may want to come over to you and ask what you are doing alone, or maybe even feel like giving you company.
Whether you are in school, college, university or work, you can always earn yourself friends or make yourself more likeable by being generous. Offer others a biscuit or your snacks.
If you are not an out-going person and want to have someone to talk to while staying in the comfort of your house, you can search for a page of interest on some social networking site such as Facebook and try starting a conversation with other people on that page. There are also various chat channels on messenger services such as Yahoo that you can join.
Take good care of your hygiene. Do not forget to take a shower everyday and wear clean clothes. Try to use a deodorant or cologne/perfume as often as you can.