have you checked website http://www.studyinlatvia.eu ? There is information about visas but I'd suggest you to start by choosing uni and they should help you with granting a visa.
Most foreign students in Latvia study in Riga Stradiņš University (https://www.rsu.lv/en) but they are providing mainly medicine programmes in English. If you're interested in other programmes, check Riga Technical University (see @ https://www.rtu.lv/en) or University of Latvia (see @ https://www.lu.lv/eng/)
These are top 3 universities in Latvia, popular both among locals, and international students. But students from Pakistan often choose also Transport and Telecommunication institute (see @ http://www.tsi.lv/en), ISMA (see @ https://www.isma.lv/en/) and others.
Admission shouldn't be hard, if you have all necessary educational documents. University of Latvia has quite extensive description of admission process, incl. getting visas. Check it. They also usually help with all the administrative procedures.