RJ45 is used to connect Ethernet port on your computer. There are two configuration: straight and cross. Straight RJ45 cables should be used to connect between computer and device such as switch or hub, and cross RJ45 cables should be used in computer-to-computer connection. Some hub or switch has the capability to detect the cable type and accept both straight and cross RJ45 cables. This is the figure of the wiring diagram.
A straight Ethernet cable has same RJ-45 pin-out configuration at both end of the CAT-5 cable, either by using EIA/TIA-568A standard or EIA/TIA-568B standard.