First create a Site-Object
SPSite _site = new SPSite(" http://Server: Port");
Then create the Web-Object
SPWeb _web = _site.OpenWeb();
To avoid a Security Exception while calling _folder.Update() later on, allow unsafe updates.
_web.AlloUnsafeUpdates();
Then create the Folder-Object
SPFolder _folder = _web.Folders[FolderName];
Read the local Document
FileStream fStream = File.OpenRead("C:/_dummy/t.txt");
byte[] contents = new byte[fStream.Length];
fStream.Read(contents, 0, (int)fStream.Length);
fStream.Close();
Add the local Document
_folder.Files.Add("Testdoc.doc", contents);
_folder.Update();