A visa is an essential stamp in your passport that is required to enter most countries. People of some nationalities may enter Taiwan with a free visa on arrival or landing visa, but this is not extendable. If you plan to stay in Taiwan to study Chinese or work you should apply for a visa before you arrive. Ideally you should get a 60-day extendable visitor visa. You can apply for a visa at any of the Taiwanese government information offices overseas. They are not called embassies but are usually called the "Taipei Economic and Cultural Office" or something similar. You can find the addresses by clicking here.
If you do not have the correct visa or your visa is about to expire you may need to do a visa run. This involves travelling to another country and getting a new visa issued by the Taiwanese representative office. Hong Kong is the most common destination for visa runs from Taiwan, although it is also possible to go to other places like Okinawa, Manila and Bangkok.
Most countries do not have official embassies in Taiwan but they maintain offices which provide all the same services as embassies such as issuing new passports, contacting relatives in an emergency, etc. They have various names. For example, the US office is called the American Institute in Taiwan (AIT) and Australia's is called the Australian Commerce and Industry Office. Contact details of the various offices can be found on the MOFA website (http://www.mofa.gov.tw). See Foreign Embassies in Taiwan and Foreign Representative Offices in Taiwan
PLEASE NOTE: People from the following countries can enter Taiwan for 30 days without a visa. This visa-free entry applies to citizens of Australia, Austria, Belgium, Brunei, Canada, Costa Rica, Denmark, Finland, France, Germany, Greece, Ireland, Iceland, Italy, Japan, Republic of Korea, Liechtenstein, Luxembourg, Malaysia, Malta, Monaco, The Netherlands ,New Zealand, Norway, Portugal, Singapore, Spain, Sweden, Switzerland, U.K. and U.S.A. However, you will not be able to extend your stay in Taiwan if you use this visa-free entry method. More details are available on the Bureau of Consular Affairs website.