Formal:
* ¿Cómo se llega a la biblioteca? (This is the most formal way to ask.)
* ¿Me puede indicar cómo llegar a la biblioteca? (This is polite and respectful, suitable for asking someone for directions.)
Informal:
* ¿Cómo puedo llegar a la biblioteca? (This is a more informal way to ask.)
* ¿Cómo llego a la biblioteca? (This is also informal, but more direct.)
You can also use these phrases depending on the situation:
* ¿Sabes cómo llegar a la biblioteca? (Do you know how to get to the library?)
* ¿Puedes decirme cómo llegar a la biblioteca? (Can you tell me how to get to the library?)
The best choice will depend on who you are talking to and the level of formality required.