This is going to just be a quick post but hopefully there's enough detail to get you going.
The heart of the command is ipconfig. You're probably familiar with it, but if you're not it displays a bunch of IP related information for the computer you're on. This includes the IP address.
The next part is find. This only outputs the lines that have a string match. I'm feeding it "IPv4" as I'm using it in WinPE v3.1, which is Windows 7 based. In XP and older you'd have to change "IPv4" to "IP Address" or something like that.
The for statement simply pulls out the correct part of the string and stores it in a variable called _IPAddress. This can then be echoed anywhere else in the batch file.