The first sentence, 图书馆在哪儿, focuses more on the location of the library. So, basically you'll receive descriptive replies such as the address of the library and the relative position, which are given by standing on the library's side to give the direction.
However, the second sentence, 去图书馆怎么走, in contrast, is used for asking the direction based on your position at that time. Here, 走 is a metaphor to "reach/arrive or by walk".
The answer to the last question is yes, you can substitute 走 with the approaches to get the destination by other vehicles such as 开车/搭公车/搭捷运/搭地铁/搭火车/骑机车. But, the grammar here might have to be slightly changed. Take your sentance for example, " 怎么开车到图书馆" make it sound more fluent in Chinese.
Hope these are helpful for you. :)