If you mean open a file in Unix which has read-only permission
... then you open it the same way you open any other file. The system will simply prevent you from writing to it.
If you mean open a file in Unix such that you can not write to the file even though you otherwise would be allowed because you do have write permission ...
... then it depends on what mechanism you use to open the file. Others have already answered for opening with the "vi" editor. Other programs such as "emacs" or other text editors would have other ways.