how to use a view to node field based on url
I am assuming, you have a node of type A, that refers to a node of type B through a node referance field "field_noderef" attached to node A. You want to display the details of node A when you visit node B.


Create a block type view. Filter as content type = A
Create a contextual filter "field_noderef", set a default value of "get NID from URL".
Display the block in node page of content type B *this part is important.