You can use one of the following:
<?php echo 'Your IP is: ' . $_SERVER['REMOTE_ADDR']; ?>
OR
<?php echo 'Your IP is: ' . getenv('REMOTE_ADDR'); ?>
You will probably use the information somewhere so it might be better to set a variable
<?php $usr_ip = $_SERVER['REMOTE_ADDR']; echo $usr_ip; ?>