Hi sanaaziz123,
I would strongly advise you to not do this. For one thing, adjusting visa status while in Germany is almost impossible and the authroities will ask you to return and apply for a spouse visa from Islamabad. In addition, going to Germany on a visit visa, you would have to declare your intent. If you say you are going for tourism and then later get married, this is lying to the authorities and will definitely create more problems for you later on. If you declare your intention of getting married, they would advise you to apply for a fiancee visa (zur Eheschliessung in Deutschland). For that visa, both of you would have to jump through a lot of legal hoops. Assuming you are in Pakistan and your bf is in Germany, you will have to get your original birth certificate, family registration certificate (nadra issues one) and some other documents. Your bf might have to submit a letter from the Standesamt saying there is no impediment to marriage (Ehefähigkeitszeugniss).
Getting married in Germany is quite complicated. Lot of people who already live in Germany go to Denmark to get married. But that route will still be difficult for you. There was a case in 2010 of a Belarussian who came to EU on a visit visa, got married to a German, arrived in Germany and applied for a famliy reunion visa and was refused. He sued the visa authority but the court dismissed his case. You can read the details here (or with google translate):
http://www.lto.de/recht/nachrichten/n/bverwg-nach-falschen-angaben-fuer-besuchsvisum-kein-visumfreier-ehegattennachzug/
You COULD come to Germany on a genuine student visa and if you do get married in Denmark then, it should be OK (provided that your intention to study was/remains genuine.)
If that too is not possible, the easiest way for both of you would be to get married in Pakistan while making sure that all required documents are obtained exactly as required. If it is not possible to have a traditional Pakistani wedding (for whatever reason/family not supportive etc), your German bf and you can get a simple Court marriage, have some witnesses and have it registered. That way, the wedding should satisfy the legal requirements. Then you can simply apply for Ehegattennachzug/family reunion visa.
For more advise specific to Pakistan, please join PakistanischeGemeinde yahoo group and remember to go through the archives before you post a question. Recently there was a thread discussing exactly the intricacies of getting married in Pakistan. Search for "Reunion: General info for all to avoid mistakes"
Good luck