A trip from Tokyo to Shin Osaka will take a little over 3 hours, if I recall correctly. If you intend to see Osaka, you will likely need to transfer to the local Osaka station, a short train ride away, and get on the local loop.
Initially, the train system was a bit complicated for me to understand. After my first day it made a lot of sense. The ticket inspectors are very helpful if you get lost (though few spoke English).